Skip to content

Postgres connection properties

This is list of properties that are compatible with postgres.

They are inside given data source configuration file. For example: postgresTest-source_1.conf These properties are saved in this format there:

"properties": {
    "ApplicationName": "testApp",
    "testQuery": "SELECT 1",
    "defaultCatalog": "test",
    "url": "jdbc:postgresql://localhost:5432/${database}"
},

⚠️ Note: You can use SHIFT with mouse scroll to scroll horizontally!

Key Description Possible values Default
adaptiveFetch Enables using of adaptive fetch, requires maxResultBuffer and defaultRowFetchSize to be set as well, only used in transactions Boolean false
adaptiveFetchMaximum Specifies maximum fetch size computed during adaptive fetch -1 ( infinity ) Integer -1
adaptiveFetchMinimum Specifies minimum fetch size computed during adaptive fetch Integer 0
allowEncodingChanges Allow for changes in client_encoding Boolean false
ApplicationName Name of the Application (backend >= 9.0) String PostgreSQL JDBC Driver
assumeMinServerVersion Assume the server is at least that version String null
autosave Specifies what the driver should do if a query fails. In autosave=always mode, JDBC driver sets a savepoint before each query, and rolls back to that savepoint in case of failure. In autosave=never mode (default), no savepoint dance is made ever. In autosave=conservative mode, safepoint is set for each query, however the rollback is done only for rare cases like 'cached statement cannot change return type' or 'statement XXX is not valid' so JDBC driver rollsback and retries String never
azureDbHost Parse the azure hostname field, and append to username as @hostname, for MySQL and Postgres String -
binaryTransferDisable Comma separated list of types to disable binary transfer. Either OID numbers or names. Overrides values in the driver default set and values set with binaryTransferEnable. String empty string
binaryTransferEnable Comma separated list of types to enable binary transfer. Either OID numbers or names String empty string
binaryTransfer Use binary format for sending and receiving data if possible Boolean true
cancelSignalTimeout The timeout that is used for sending cancel command. Integer 10
cleanupSavePoints Determines if the SAVEPOINT created in autosave mode is released prior to the statement. This is done to avoid running out of shared buffers on the server in the case where 1000's of queries are performed. Boolean false
connectTimeout The timeout value used for socket connect operations. 0 (Disabled) Integer 10
currentSchema Specify the schema to be set in the search-path 0 (Disabled) or Integer (max 2147484) null
databaseMetadataCacheFieldsMiB Specifies the maximum size (in megabytes) of fields to be cached per connection. A value of {@code 0} disables the cache. 0 (Disabled) Integer 5
databaseMetadataCacheFields Specifies the maximum number of fields to be cached per connection. A value of {@code 0} disables the cache. 0 (Disabled) Integer 65536
defaultRowFetchSize Positive number of rows that should be fetched from the database when more rows are needed for ResultSet by each fetch iteration 0 (All rows at once is the default) or Integer 0 (All rows at once)
disableColumnSanitiser Enable optimization that disables column name sanitiser Boolean off (false)
extraFloatDigits If the JDBC driver should set extra_float_digits on connect, defaults to true (needs custom PG driver) Boolean true
gsslib Force SSSPI or GSSAPI String auto
hdUsePGNotify Leverage the Postgres 9.0+ notify interface to publish/listen for invalidations instead of the grid cache. Can be leveraged from triggers as well for real-time invalidation of out-of-band updates. Defaults to false (boolean). Boolean false
hdNotifyDBs CSV list of database names to listen to for hdUsePGNotify. String postgres
hostRecheckSeconds Specifies period (seconds) after which the host status is checked again in case it has changed Integer 10
jaasApplicationName Specifies the name of the JAAS system or application login configuration. String pgjdbc
jaasLogin Login with JAAS before doing GSSAPI authentication Boolean true
kerberosServerName The Kerberos service name to use when authenticating with GSSAPI. String postgres
loadBalanceHosts If disabled hosts are connected in the given order. If enabled hosts are chosen randomly from the set of suitable candidates Boolean false
loggerFile File name output of the Logger String System.err
loggerLevel Logger level of the driver String OFF
loginTimeout Specify how long to wait for establishment of a database connection. Integer (max 2147484) 0
logUnclosedConnections When connections that are not explicitly closed are garbage collected, log the stacktrace from the opening of the connection to trace the leak source Boolean false
options Specify 'options' connection initialization parameter String -
preferQueryMode Specifies which mode is used to execute queries to database: simple means ('Q' execute, no parse, no bind, text mode only), extended means always use bind/execute messages, extendedForPrepared means extended for prepared statements only, extendedCacheEverything means use extended protocol and try cache every statement (including Statement.execute(String sql)) in a query cache. (String) extended, extendedForPrepared, extendedCacheEverything, simple extended
preparedStatementCacheQueries Specifies the maximum number of entries in per-connection cache of prepared statements. A value of {@code 0} disables the cache. 0 (Disabled) or Integer 256
preparedStatementCacheSizeMiB Specifies the maximum size (in megabytes) of a per-connection prepared statement cache. A value of {@code 0} disables the cache. 0 (Disabled) or Integer 5
prepareThreshold Statement prepare threshold. A value of {@code -1} stands for forceBinary -1 (force binary transfer) Integer 5
protocolVersion The driver supports the V3 frontend/backend protocols. The V3 protocol was introduced in 7.4 and the driver will by default try to connect using the V3 protocol. Integer null
queryTimeout Sets the default query timeout value, set by Heimdall via the setQueryTimeout method 0 (No limit) Integer 0
readOnly Puts this connection in read-only mode Boolean false
receiveBufferSize Socket read buffer size Integer -1
replication Connection parameter passed in startup message, one of 'true' or 'database' Passing 'true' tells the backend to go into walsender mode, wherein a small set of replication commands can be issued instead of SQL statements. Only the simple query protocol can be used in walsender mode. Passing 'database' as the value instructs walsender to connect to the database specified in the dbname parameter, which will allow the connection to be used for logical replication from that database. (backend >= 9.4) String (true and database) false
reWriteBatchedInserts Enable optimization to rewrite and collapse compatible INSERT statements that are batched. Boolean false
sendBufferSize Socket write buffer size Integer -1
socketFactoryArg Argument forwarded to constructor of SocketFactory class. String -
socketFactory Specify a socket factory for socket creation String null
socketTimeout The timeout value used for socket read operations. Integer max(2147484) 0
sslcert The location of the client's SSL certificate String defaultdir/postgresql.crt
ssl Control use of SSL (any non-null value causes SSL to be required) Boolean false
sslfactoryarg Argument forwarded to constructor of SSLSocketFactory class. String -
sslfactory Provide a SSLSocketFactory class when using SSL. String org.postgresql.ssl.LibPQFactory
sslhostnameverifier A class, implementing javax.net.ssl.HostnameVerifier that can verify the server String org.postgresql.ssl.PGjdbcHostnameVerifier
sslkey The location of the client's PKCS#8 SSL key String defaultdir/postgresql.pk8
sslmode Parameter governing the use of SSL String (disable , allow , prefer , require , verify-ca, verify-full . require , allow and prefer) prefer
sslpasswordcallback A class, implementing javax.security.auth.callback.CallbackHandler that can handle PassworCallback for the ssl password. String org.postgresql.ssl.jdbc4.LibPQFactory.ConsoleCallbackHandler
sslpassword The password for the client's ssl key (ignored if sslpasswordcallback is set) String null
sslrootcert The location of the root certificate for authenticating the server. String defaultdir/root.crt
sspiServiceClass The Windows SSPI service class for SPN String POSTGRES
stringtype The type to bind String parameters as (usually 'varchar', 'unspecified' allows implicit casting to other types) String null
targetServerType Specifies what kind of server to connect. The primary/secondary distinction is currently done by observing if the server allows writes. The value preferSecondary tries to connect to secondary if any are available, otherwise allows falls back to connecting also to primary. The value preferPrimary tries to connect to primary if it is available, otherwise allows falls back to connecting to secondaries available. String (any, primary, master, slave, secondary, preferSlave, preferSecondary, preferPrimary) any
tcpKeepAlive Enable or disable TCP keep-alive. The default is {@code false}. Boolean false
unknownLength Specifies the length to return for types of unknown length Integer Integer.MAX_VALUE
useSpnego Use SPNEGO in SSPI authentication requests Boolean false
maxResultBuffer Specify the size of the result buffer when not streaming results, will generate an exception if the result exceeds this size. Specify in units of k,m or g, or percent for total heap percent, i.e. 10percent String null