PostgreSQL settings
For Managed Service for PostgreSQL clusters, you can configure PostgreSQL settings. Some settings are configured at the cluster level, while others, at the user level.
The label next to the setting name shows which interface can be used to set the value of this setting: the management console, CLI, API, or Terraform. The All interfaces label means that all of the above interfaces are supported.
Depending on the selected interface, the same setting may be represented in a different way, e.g.:
- Backend flush after in the management console is the same as:
backend_flush_afterin the gRPC API, CLI, and Terraform.backendFlushAfterin the REST API.
- Default transaction isolation in the user-level settings in the management console is the same as:
--default-transaction-isolationin the CLI.default_transaction_isolationin the gRPC API.defaultTransactionIsolationin the REST API.
Settings dependency on the host class and storage size
The values of some PostgreSQL settings can be automatically adjusted when you change the host class or storage size:
- If the values were not specified or are not suitable for the new class or size, the default settings for this class or size will be applied.
- If the settings you specified manually are suitable for the new class or size, they will not change.
The settings that depend on the host class are:
- Autovacuum max workers.
- Autovacuum vacuum cost delay.
- Autovacuum vacuum cost limit.
- Conn limit.
- Max connections.
- Shared buffers.
The settings that depend on the storage size are:
Cluster-level settings
You can use the following settings at the cluster level:
-
Archive timeout
All interfacesPostgreSQL transaction log archiving interval (ms).
The minimum value is
10000, the maximum is86400000, and the default is30000.For more information, see this PostgreSQL guide
. -
Array nulls
All interfacesManages the recognition of the
NULLelements during array insertion. If enabled, they are interpreted as SQLNULLvalues. If disabled, they are interpreted as the literal stringNULL.This setting is enabled by default.
For more information, see this PostgreSQL guide
. -
Auto explain log analyze
Management consoleAPITerraformDetermines whether query plan statistics are automatically written to the PostgreSQL log, without using the
EXPLAINcommand. This allows you to track unoptimized queries. This setting uses theauto_explainmodule. To enable it, load theauto_explainlibrary.By default, this setting is disabled, meaning query plan statistics are not logged.
For more information, see this PostgreSQL guide
. -
Auto explain log buffers
Management consoleAPITerraformDetermines whether buffer usage statistics are written to the PostgreSQL log by the
auto_explainmodule. It works the same as theBUFFERSoption in theEXPLAINcommand. This setting only applies when Auto explain log analyze is enabled.By default, this setting is disabled, meaning buffer usage statistics are not logged.
For more information, see this PostgreSQL guide
. -
Auto explain log min duration
Management consoleAPITerraformMinimum query execution time (in milliseconds) required to activate logging in the
auto_explainmodule.The minimum and default value is
-1(logging disabled) and the maximum is2147483647. If set to0, all query plans are logged, regardless of their execution time.For more information, see this PostgreSQL guide
. -
Auto explain log nested statements
Management consoleAPITerraformDetermines whether the
auto_explainmodule will log the execution of nested queries inside SQL functions. This setting only applies when Auto explain log analyze is enabled.By default, this setting is disabled, meaning only top-level query plans are logged.
For more information, see this PostgreSQL guide
. -
Auto explain log timing
Management consoleAPITerraformDetermines whether the
auto_explainmodule will log the execution time for each step of the query plan. It works the same as theTIMINGoption in theEXPLAINcommand. This setting only applies when Auto explain log analyze is enabled.By default, this setting is disabled, meaning that execution time for individual query steps is not logged.
For more information, see this PostgreSQL guide
. -
Auto explain log triggers
Management consoleAPITerraformDetermines whether the
auto_explainmodule will output trigger execution statistics. This setting only applies when Auto explain log analyze is enabled.By default, this setting is disabled, meaning trigger execution statistics are not reported.
For more information, see this PostgreSQL guide
. -
Auto explain log verbose
Management consoleAPITerraformDetermines whether the
auto_explainmodule will generate detailed logs. It works the same as theVERBOSEoption in theEXPLAINcommand. This setting only applies when Auto explain log analyze is enabled.By default, this setting is disabled, meaning no logging details are provided.
For more information, see this PostgreSQL guide
. -
Auto explain sample rate
Management consoleAPITerraformFraction of queries logged by the
auto_explainmodule in each session. This setting only applies when Auto explain log analyze is enabled.The minimum value is
0.0, and the maximum value is1.0(all queries are logged). The default value is1.0.For more information, see this PostgreSQL guide
. -
Autovacuum analyze scale factor
All interfacesFraction of changed or deleted rows in a table that will trigger the autovacuum
process to run theANALYZEcommand for statistics collection.The minimum value is
0.0, the maximum is1.0, and the default is0.0001.For more information, see this PostgreSQL guide
. -
Autovacuum max workers
Management consoleAPITerraformCLIMaximum number of autovacuum worker processes
running in parallel. Autovacuuming runs periodically for each database. It identifies which rows in tables are marked for deletion and removes them.This setting can range from
1to32. The default value depends on the selected host class and is equal to the number of vCPUs on a single host, with a minimum of3.For more information, see this PostgreSQL guide
. -
Autovacuum naptime
Management consoleAPITerraformDetermines the minimum interval (in milliseconds) between autovacuum
jobs. To avoid overloading the database during periods of frequent data changes, increase this setting.The minimum value is
1000, the maximum is86400000, and the default is15000.For more information, see this PostgreSQL guide
. -
Autovacuum vacuum cost delay
All interfacesTime (in milliseconds) the autovacuum
process will idle after exceeding the cost limit.The minimum value is
-1(disables the setting) and the maximum is100. The default value depends on the selected host class.-
If the number of vCPUs for the selected host class is 10 or more, the default value is set to
5. -
In other cases, the default value is computed as follows:
55 - 5 × <number_of_vCPUs_per_host>
For more information, see this PostgreSQL guide
. -
-
Autovacuum vacuum cost limit
All interfacesCost limit which, when exceeded, will pause the autovacuum process
for the duration specified in the Autovacuum vacuum cost delay setting.The minimum value is
-1(disables the setting) and the maximum is10000. The default value depends on the selected host class and is computed as follows:150 × <number_of_vCPUs_per_host> + 400Here is an example:
Host class vCPU Default value s2.small 4 150 × 4 + 400 = 1000m2.medium 6 150 × 6 + 400 = 1300For more information, see this PostgreSQL guide
. -
Autovacuum vacuum insert scale factor
All interfacesFraction of a table’s size that is added to Autovacuum vacuum insert threshold to determine the condition for triggering an autovacuum
.The minimum value is
0.0, the maximum is1.0, and the default is0.2.This feature is supported by PostgreSQL starting from version 13.
For more information, see this PostgreSQL guide
. -
Autovacuum vacuum insert threshold
All interfacesDetermines the number of rows inserted into a table that will trigger an autovacuum
.The minimum value is
-1(disables the setting), the maximum is2147483647, and the default is1000.This feature is supported by PostgreSQL starting from version 13.
For more information, see this PostgreSQL guide
. -
Autovacuum vacuum scale factor
All interfacesFraction of changed or deleted rows in a table that will trigger the autovacuum
process to run theVACUUMcommand for reclaiming storage occupied by dead tuples.The minimum value is
0.0(disables the setting), the maximum is1.0, and the default is0.00001.For more information, see this PostgreSQL guide
. -
Autovacuum work mem
Management consoleAPITerraformCLIMemory (in bytes) allocated to each autovacuum process
.The minimum value is
-1(disables the setting), the maximum is2147483647, and the default value is-1.For more information, see this PostgreSQL guide
. -
Backend flush after
All interfacesMaximum amount of data (in kilobytes) a utility process can write to the OS kernel’s page cache. When this amount is exceeded, the DBMS instructs the OS to flush the data to disk. The higher value for this setting reduces the likelihood of write slowdowns when data is flushed to disk by the
fsync,e.g., after a checkpoint is completed.The minimum value is
0(disables the setting), the maximum is2048, and the default is0.For more information, see this PostgreSQL guide
. -
Backslash quote
All interfacesControls how a quotation mark is represented within an SQL string.
The allowed values are:
backslash_quote(BACKSLASH_QUOTEfor Terraform, API, and CLI): Quotation mark can be represented as\'(same ason).on(BACKSLASH_QUOTE_ONfor Terraform, API, and CLI): Quotation mark can be represented as\'.off(BACKSLASH_QUOTE_OFFfor Terraform, API, and CLI): Quotation mark can only be represented using the standard SQL syntax''.safe_encoding(BACKSLASH_QUOTE_SAFE_ENCODINGfor Terraform, API, and CLI): Representing a quotation mark as\'is only permitted for client encodings where\is not used for multibyte characters.
The default value is
safe_encoding.For more information, see this PostgreSQL guide
. -
Bgwriter delay
All interfacesTime (in milliseconds) between background writer runs. This process writes new or changed pages from the PostgreSQL buffer cache to the disk. The delay prevents rewriting the same page on every update, thus reducing disk load.
The minimum value is
10, the maximum is10000, and the default is200.For more information, see this PostgreSQL guide
. -
Bgwriter flush after
Management consoleAPITerraformMaximum amount of data (in kilobytes) processed by the background writer. When this limit is exceeded, the DBMS instructs the OS to flush the data to disk. This setting limits the amount of
dirty
data in the kernel page cache, reducing the risk of slowdowns when executingfsyncat the end of a checkpoint or during the OS’s background writeback process.The minimum value is
0, the maximum is2048, and the default is512.For more information, see this PostgreSQL guide
. -
Bgwriter lru maxpages
All interfacesMaximum number of PostgreSQL buffer cache pages the background writer can save per activity round. A value of zero disables background writing.
The minimum value is
0, the maximum is1073741823, and the default is100.For more information, see this PostgreSQL guide
. -
Bgwriter lru multiplier
All interfacesMultiplier determining the factor by which the average number of buffers held by the background writeback process will be increased during the next round.
The minimum value is
0, the maximum is10, and the default is2.For more information, see this PostgreSQL guide
. -
Bytea output
All interfacesDefines the
byteaoutput format for binary string values :hex(BYTEA_OUTPUT_HEXfor Terraform, API, and CLI): Each byte is represented by two hexadecimal characters, e.g., 'SELECT '\xDEADBEEF';'.escape(BYTEA_OUTPUT_ESCAPEfor Terraform, API, and CLI): Standard PostgreSQL format with ASCII characters only.
The default value is
hex.For more information, see this PostgreSQL guide
. -
Checkpoint completion target
All interfacesFraction of the checkpoint interval determining the maximum allowed time for a checkpoint to complete. For example, if this value is set to
0.5, the checkpoint will finish with about half the time left until the next checkpoint.The minimum value is
0.0, the maximum is1.0, and the default is0.5.For more information, see this PostgreSQL guide
. -
Checkpoint flush after
Management consoleAPITerraformThe amount of dirty data in memory (in kilobytes) that triggers a flush during a checkpoint. Pages beyond this limit will be flushed to disk and deleted from the OS page cache.
The minimum value is
0, the maximum is2048, and the default is256.For more information, see this PostgreSQL guide
. -
Checkpoint timeout
All interfacesInterval between checkpoints (in milliseconds).
The minimum value is
30000, the maximum is86400000, and the default is300000.For more information, see this PostgreSQL guide
. -
Client connection check interval
Management consoleAPICLIClient connection check interval during query execution (in milliseconds). The check polls the server’s connection socket and aborts long queries upon detecting that the connection has been terminated.
The minimum value is
0(disables checks) and the maximum is2147483647. By default, the system uses the minimum value.This feature is supported by PostgreSQL starting from version 14.
For more information, see this PostgreSQL guide
. -
Client min messages
All interfacesLevel of logging messages sent to client applications. Possible values (in ascending order of severity):
debug5,debug4,debug3,debug2,debug1,info,notice,warning,error,log,fatal, andpanic(for Terraform, API, and CLI,LOG_LEVEL_DEBUG5,LOG_LEVEL_DEBUG4,LOG_LEVEL_DEBUG3,LOG_LEVEL_DEBUG2,LOG_LEVEL_DEBUG1,LOG_LEVEL_INFO,LOG_LEVEL_NOTICE,LOG_LEVEL_WARNING,LOG_LEVEL_ERROR,LOG_LEVEL_LOG,LOG_LEVEL_FATAL, andLOG_LEVEL_PANIC).The default value is
NOTICE.For more information, see this PostgreSQL guide
. -
Constraint exclusion
All interfacesAllows the planner to use table constraints for query optimization.
Values for this setting can range:
on(CONSTRAINT_EXCLUSION_ONfor Terraform, API, and CLI): Use constraints for all tables.off(CONSTRAINT_EXCLUSION_OFFfor Terraform, API, and CLI): Do not use constraints.partition(CONSTRAINT_EXCLUSION_PARTITIONfor Terraform, API, and CLI): Only use constraints for child tables andUNION ALLclauses.
The default value is
partition.For more information, see this PostgreSQL guide
. -
Cursor tuple fraction
All interfacesDefines the planner's estimate for the fraction of rows that will be retrieved via a cursor.
The minimum value is
0.0, the maximum is1.0, and the default is0.1.For more information, see this PostgreSQL guide
. -
Deadlock timeout
Management consoleAPITerraformCLITimeout period (in milliseconds) before the system will check for a deadlock condition.
The minimum value is
1, the maximum is2147483647, and the default is1000.For more information, see this PostgreSQL guide
. -
Default statistics target
All interfacesMaximum number of statistical records per column in database tables. Using this statistics, the planner estimates the number of rows returned by queries in order to choose the most optimal query plan.
For more accurate planner estimates, increase this setting.
The minimum value is
1, the maximum is10000, and the default is1000.For more information, see this PostgreSQL guide
. -
Default transaction isolation
All interfacesThis setting determines the default isolation level for new SQL transactions.
Values for this setting can range:
read committed(TRANSACTION_ISOLATION_READ_COMMITTEDfor Terraform, API, and CLI): A query can only see rows that were committed before it started.read uncommitted(TRANSACTION_ISOLATION_READ_UNCOMMITTEDfor Terraform, API, and CLI): In PostgreSQL, this isolation level is identical toread committed.repeatable read(TRANSACTION_ISOLATION_REPEATABLE_READfor Terraform, API, and CLI): All queries in the current transaction see only those rows that were committed before the first SELECT or UPDATE query in this transaction.serializable(TRANSACTION_ISOLATION_SERIALIZABLEfor Terraform, API, and CLI): The strictest isolation level. In PostgreSQL, this isolation level is identical torepeatable read. However, if the interleaving of read and write operations in concurrent serializable transactions is incompatible with their serial execution, one of the transactions will be rolled back with theserialization failure
error.
The default value is
read committed.To learn more about isolation levels, see this PostgreSQL article
.The setting applies at the Managed Service for PostgreSQL cluster level, but can be overridden for individual users.
-
Default transaction read only
All interfacesSets the default transaction access mode to
read only
for all tables except temporary ones.By default, this setting is disabled, meaning that both reads and writes are permitted.
For more information, see this PostgreSQL guide
. -
Default with oids
All interfacesAdds an
OIDcolumn containing a unique row ID. This setting only applies when a table is created:- Without an explicit
WITH OIDSorWITHOUT OIDSclause, OR. - Using the
SELECT INTOstatement.
By default, this setting is disabled, meaning no
OIDcolumn is added.Support for this feature was removed in PostgreSQL version 12. Use this setting only for compatibility with legacy applications.
For more information, see this PostgreSQL guide
. - Without an explicit
-
Effective cache size
All interfacesAn estimate of the effective disk cache size (in bytes) available for a single query. Higher values of this setting increase the possibility of the query planner to use an index scan. Conversely, lower values make the planner more likely to choose a sequential scan.
The minimum value is
0, the maximum is549755813888(512 GB), and the default is107374182400(100 GB).For more information, see this PostgreSQL guide
. -
Effective io concurrency
All interfacesMaximum of concurrent disk I/O operations per database session. A higher value increases the number of operations that a PostgreSQL session will try to run concurrently.
The minimum value is
0, the maximum is1000, and the default is1.For more information, see this PostgreSQL guide
. -
Enable async append
Management consoleAPICLIAllows the planner to account for asynchronous query plan execution on multiple hosts during data ingestion from external sources.
This setting is enabled by default.
This feature is supported by PostgreSQL starting from version 14.
For more information, see this PostgreSQL guide
. -
Enable bitmapscan
All interfacesAllows the planner to perform a Bitmap Index Scan, even if it is not explicitly specified in the query. This access method is similar to a regular index scan, but occurs in two stages:
-
A Bitmap Index Scan builds a bitmap, marking all relevant row locations.
-
Then the system performs a Bitmap Heap Scan on the table. In this case, the following applies:
- Sequential page reads increase the chance of hitting the OS cache.
- The system reads each page only once.
This setting is most effective for repeated queries to the same tables.
This setting is enabled by default.
For more information, see this PostgreSQL guide
. -
-
Enable gathermerge
Management consoleAPICLIAllows the planner to use the Gather Merge node to merge rows produced by parallel processes while preserving the original output order.
This setting is enabled by default.
This feature is supported by PostgreSQL starting from version 14.
For more information, see this PostgreSQL guide
. -
Enable hashagg
All interfacesAllows the planner to build a hash table from the source data, even if it is not explicitly specified in the query. This setting is most effective for frequent, unsorted queries on large tables.
This setting is enabled by default.
For more information, see this PostgreSQL guide
. -
Enable hashjoin
All interfacesAllows the planner to perform hash joins (
JOIN) on tables, even if it is not explicitly specified in the query. This setting is most effective when working with large data volumes or when the tables are not pre-sorted by their join keys.This setting is enabled by default.
For more information, see this PostgreSQL guide
. -
Enable incremental sort
All interfacesAllows the planner to use incremental sort. This sorting method reduces query execution time and the amount of RAM required when you need to sort by multiple columns, and one or more of them are already sorted.
This setting is enabled by default.
This feature is supported by PostgreSQL starting from version 13.
For more information, see this PostgreSQL guide
. -
Enable indexonlyscan
All interfacesAllows the planner to perform an index-only scan, even if it is not explicitly specified in the query.
This setting is enabled by default.
For more information, see this PostgreSQL guide
. -
Enable indexscan
All interfacesAllows the planner to use an index scan, even if it is not explicitly specified in the query.
This setting is enabled by default.
For more information, see this PostgreSQL guide
. -
Enable material
All interfacesAllows the planner to use materialize nodes.
This setting is enabled by default.
For more information, see this PostgreSQL guide
. -
Enable mergejoin
All interfacesAllows the query planner to use the merge
JOINmethod.This setting is enabled by default.
For more information, see this PostgreSQL guide
. -
Enable nestloop
All interfacesAllows the planner to use the nested loop
JOINmethod. When this setting is disabled, the planner will use alternative methods.This setting is enabled by default.
For more information, see this PostgreSQL guide
. -
Enable parallel append
All interfacesAllows the planner to use parallel-aware append.
This setting is enabled by default.
For more information, see this PostgreSQL guide
. -
Enable parallel hash
All interfacesAllows the planner to use parallel hash joins. This setting only applies when Enable hashjoin is turned on.
This setting is enabled by default.
For more information, see this PostgreSQL guide
. -
Enable partition pruning
All interfacesAllows the planner to prune unnecessary partitions when building query plans for partitioned tables.
This setting is enabled by default.
For more information, see this PostgreSQL guide
. -
Enable partitionwise aggregate
All interfacesAllows the planner to perform grouping and aggregate operations partition-by-partition.
By default, this setting is disabled, meaning that the planner ignores partitions.
For more information, see this PostgreSQL guide
. -
Enable partitionwise join
All interfacesAllows the planner to use partition-wise joins. This setting enables the execution of joins on partitioned tables by joining their matching partitions.
By default, this setting is disabled, meaning that the planner ignores partitions.
For more information, see this PostgreSQL guide
. -
Enable seqscan
All interfacesAllows the planner to use sequential table scans.
This setting is enabled by default.
For more information, see this PostgreSQL guide
. -
Enable sort
All interfacesAllows the planner to use explicit sort operations.
This setting is enabled by default.
For more information, see this PostgreSQL guide
. -
Enable tidscan
All interfacesAllows the planner to use TID (tuple ID) scans for faster query performance.
This setting is enabled by default (the planner uses TID scans).
For more information, see this PostgreSQL guide
. -
Escape string warning
All interfacesEnables a warning for situations when a backslash (
\) appears in a regular string constant (with the'...'syntax). This setting only applies if Standard conforming strings is disabled.This setting is enabled by default.
For more information, see this PostgreSQL guide
. -
Exit on error
All interfacesEnables session termination upon any query error.
This setting is disabled by default.
For more information, see this PostgreSQL guide
. -
Force parallel mode
All interfacesAllows query parallelization for testing purposes:
off(FORCE_PARALLEL_MODE_OFFfor Terraform, API, and CLI): Enable parallel mode only if it is expected to increase performance.on(FORCE_PARALLEL_MODE_ONfor Terraform, API, and CLI): Force parallel mode for all queries that can be executed safely in parallel.regress(FORCE_PARALLEL_MODE_REGRESSfor Terraform, API, and CLI): Equivalent toon, but generates output identical to theoffstate.
The default value is
off.For more information, see this PostgreSQL guide
. -
From collapse limit
All interfacesAs long as the number of elements in the
FROMclause does not exceed this setting, the query planner will merge subqueries with the outer query. Decreasing this value reduces planning time, but can result in a less efficient query plan.The minimum value is
1, the maximum is2147483647, and the default is8.For more information, see this PostgreSQL guide
. -
Geqo
Management consoleAPIEnables genetic query optimization (GEQO
).Default value:
false(disables genetic optimization).For more information, see this PostgreSQL guide
. -
Geqo effort
Management consoleAPISets the trade-off between query planning time and plan quality in the GEQO
algorithm.A higher value increases query planning time but also raises the probability of selecting an efficient query plan. This setting does not directly control the algorithm; instead, it is used to calculate default values for other settings.
The minimum value is
1, the maximum is10, and the default is5.For more information, see this PostgreSQL guide
. -
Geqo generations
Management consoleAPIDefines the number of generations in the GEQO
algorithm.The practical range for this setting is between
100and1000.If this setting’s value is left to default, i.e.,
0, the number of generations is selected based on Geqo pool size.For more information, see this PostgreSQL guide
. -
Geqo pool size
Management consoleAPISpecifies the number of individuals in the genetic population for the GEQO
algorithm.This value cannot be
1. The practical range for this setting is between100and1000.If this setting’s value is left to default, i.e.,
0, the number of individuals is selected based on Geqo effort and the number of tables in the query.For more information, see this PostgreSQL guide
. -
Geqo seed
Management consoleAPIDefines the seed value for the GEQO
‘s random number generator used when exploring the join order search space.Changing this setting alters the set of join paths explored, which may either improve or degrade the effectiveness of the resulting path.
The minimum value is
0, the maximum is1, and the default is0.For more information, see this PostgreSQL guide
. -
Geqo selection bias
Management consoleAPIDefines the selection pressure within the GEQO
population.The minimum value is
1.50, the maximum is2.00, and the default is2.00.For more information, see this PostgreSQL guide
. -
Geqo threshold
Management consoleAPIThe GEQO
algorithm will only be used to plan queries where the number of tables in theFROMclause is equal to or greater than this setting.For small queries, it is generally better to use the standard planner performing an exhaustive search. However, for queries involving a large number of tables, an exhaustive search method may take longer than just using a suboptimal plan.
The minimum value is
2, the maximum is2147483647, and the default is12.For more information, see this PostgreSQL guide
. -
Gin pending list limit
All interfacesDefines the maximum size (in bytes) of the GIN index's
pending list. This list is used whenfastupdatemode is enabled. If the pending list exceeds the specified limit, all its entries are moved to the main GIN index structure and the list is cleared.The minimum value is
64, the maximum is2147483647(2 GB), and the default is4194304.For more information, see this PostgreSQL guide
. -
Hash mem multiplier
Management consoleAPITerraformDefines the maximum amount of memory available for hash table operations. The total amount is calculated as this setting’s value multiplied by Work mem.
The minimum value is
0.0, the maximum is1000.0, and the default is1.0.This feature is supported by PostgreSQL starting from version 13.
For more information, see this PostgreSQL guide
. -
Idle in transaction session timeout
All interfacesOpen transaction idle timeout (in milliseconds). If exceeded, the transaction's session will be terminated.
The minimum value is
0, the maximum is2147483647, and the default is0.For more information, see this PostgreSQL guide
. -
Jit
Management consoleAPITerraformEnables Just-in-Time (JIT) compilation
of PostgreSQL queries. If this setting is enabled, SQL queries are compiled into machine code at runtime, which accelerates the execution of complex CPU-intensive queries.This setting is disabled by default.
For more information, see this PostgreSQL guide
. -
Join collapse limit
All interfacesDefines a threshold for the number of elements in the
FROMlist. Until it is exceeded, the planner will transfer explicitJOINconstructs (with the exception ofFULL JOIN) into the list. Decreasing this value reduces planning time, but can result in a less efficient query plan.The minimum value is
1; the maximum value is2147483647; the default value is8.For more information, see this PostgreSQL guide
. -
Lo compat privileges
Management consoleAPICLITerraformDisables access permission checks for large objects. Prior to version 9.0, access permissions did not apply to large objects, allowing any user to read and write them. Enable this setting if you need compatibility with pre-9.0 releases of PostgreSQL.
This setting is disabled by default, meaning that access permission checks are enabled.
For more information, see this PostgreSQL guide
. -
Lock timeout
All interfacesSpecifies the waiting time (in milliseconds) for the lock to be released. Locks can be used for tables, indexes, rows, and other database objects. If the timeout for an operation has expired, the operation is aborted.
The minimum value is
0(disables the timeout; allowing the system to wait for a lock indefinitely), the maximum is2147483647, and the default is1000.For more information, see this PostgreSQL guide
.The setting applies at the Managed Service for PostgreSQL cluster level, but can be overridden for individual users.
-
Log checkpoints
All interfacesEnables logging of checkpoints and server restarts.
The setting is disabled by default (no logging).
For more information, see this PostgreSQL guide
. -
Log connections
Management consoleAPICLITerraformEnables logging of all PostgreSQL server connection attempts, including those where client authentication was successful.
The setting is disabled by default (no logging).
For more information, see this PostgreSQL guide
. -
Log disconnections
Management consoleAPICLITerraformEnables logging of session terminations.
The setting is disabled by default (no logging).
For more information, see this PostgreSQL guide
. -
Log duration
Management consoleAPICLITerraformEnables logging of the execution time for each completed command.
The setting is disabled by default (no logging).
For more information, see this PostgreSQL guide
. -
Log error verbosity
Management consoleAPICLITerraformDefines the verbosity level for PostgreSQL log entries. Log detail levels, from least to most verbose:
terse(LOG_ERROR_VERBOSITY_TERSEfor Terraform, CLI, and API):DETAIL,HINT,QUERY, andCONTEXTfields are excluded from the error message.default(LOG_ERROR_VERBOSITY_DEFAULTfor Terraform, CLI, and API): Default.verbose(LOG_ERROR_VERBOSITY_VERBOSEfor Terraform, CLI, and API): Error message includes theSQLSTATEerror code, source filename, function name, and the line number where the error occurred.
For more information, see this PostgreSQL guide
. -
Log lock waits
Management consoleAPICLITerraformControls the logging of long lock waits. When this setting is enabled, the system writes a log entry whenever a PostgreSQL session’s lock acquisition time exceeds the Deadlock timeout value.
This setting is disabled by default.
For more information, see this PostgreSQL guide
. -
Log min duration sample
Management consoleAPITerraformThis setting works the same as Log min duration statement, but only applies to the statements listed in Log statement sample rate.
A value of
0enables execution time logging for all listed statements.The minimum value is
-1(disables execution time logging), the maximum is2147483647, and the default is-1.This feature is supported by PostgreSQL starting from version 13.
For more information, see this PostgreSQL guide
. -
Log min duration statement
Management consoleAPICLITerraformDefines the minimum statement runtime (in milliseconds) required for it to be logged.
A value of
0enables execution time logging for all statements.The minimum value is
-1(disables execution time logging), the maximum is2147483647, and the default is-1.For more information, see this PostgreSQL guide
.The setting applies at the Managed Service for PostgreSQL cluster level, but can be overridden for individual users.
-
Log min error statement
Management consoleAPICLITerraformDefines the logging level for SQL runtime errors. The system logs statement execution information if the statement completes with an error of the specified severity level or higher. Possible values:
DEBUG5,DEBUG4,DEBUG3,DEBUG2,DEBUG1,INFO,NOTICE,WARNING,ERROR,LOG,FATAL, andPANIC.The default value is
ERROR. This means PostgreSQL will log all statements that ended with an error of theERROR,LOG,FATAL, orPANICseverity level.To disable logging for most failed statements, select the
PANICvalue.For more information, see this PostgreSQL guide
. -
Log min messages
Management consoleAPICLITerraformDefines the PostgreSQL logging level. The system logs all messages with the selected severity level or higher. Possible values (in ascending order of severity):
DEBUG5,DEBUG4,DEBUG3,DEBUG2,DEBUG1,INFO,NOTICE,WARNING,ERROR,LOG,FATAL, andPANIC.The default value is
WARNING. This means PostgreSQL will log all messages with theWARNING,ERROR,LOG,FATAL, andPANICseverity level.To disable logging for most messages, select
PANIC.For more information, see this PostgreSQL guide
. -
Log parameter max length
Management consoleAPICLITerraformShortens the value of each bound SQL parameter to the specified number of bytes for output with SQL statements in non-error log messages.
A value of
0disables logging.The minimum value is
-1(parameter values are logged in full) and the maximum is1073741823. By default, the system uses the minimum value.This feature is supported by PostgreSQL starting from version 13.
For more information, see this PostgreSQL guide
. -
Log parameter max length on error
All interfacesShortens the value of each bound SQL parameter to the specified number of bytes for output with SQL statements in error log messages.
A value of
0disables logging.The minimum value is
-1(parameter values are logged in full) and the maximum is1073741823. By default, the system uses the minimum value.This feature is supported by PostgreSQL starting from version 13.
For more information, see this PostgreSQL guide
. -
Log recovery conflict waits
Management consoleAPICLIEnables logging of replication delays caused by recovery conflicts during WAL reading. The system adds log entries if conflict resolution timeout exceeds the Deadlock timeout value.
This setting is disabled by default.
This feature is supported by PostgreSQL starting from version 14.
For more information, see this PostgreSQL guide
. -
Log statement
Management consoleAPICLITerraformFilter for SQL statements to be logged by PostgreSQL:
none(LOG_STATEMENT_NONEfor Terraform, CLI, and API): The filter is disabled, no SQL statements are logged.ddl(LOG_STATEMENT_DDLfor Terraform, CLI, and API): System logs data definition language statements, e.g.,CREATE,ALTER,DROPetc.mod(LOG_STATEMENT_MODfor Terraform, CLI, and API): System logsddl-statements along with data modification commands, e.g.,INSERT,UPDATE, etc.all(LOG_STATEMENT_ALLfor Terraform, CLI, and API): System logs all SQL statements.
The default value is
none.For more information, see this PostgreSQL guide
.The setting applies at the Managed Service for PostgreSQL cluster level, but can be overridden for individual users.
-
Log statement sample rate
Management consoleAPITerraformFraction of SQL statements that will be logged as a supplement to statements logged for other reasons.
The minimum value is
0.0, the maximum is1.0, and the default is0.0.This feature is supported by PostgreSQL starting from version 13.
For more information, see this PostgreSQL guide
. -
Log temp files
Management consoleAPICLITerraformSets the minimum size of a temporary file, triggering PostgreSQL to log its details upon deletion.
The minimum value is
-1(information about deleted files is not logged) and the maximum is2147483647(2 GB). A value of0enables logging of all temporary file names and sizes. The default value is-1.For more information, see this PostgreSQL guide
. -
Log transaction sample rate
Management consoleAPITerraformFraction of transactions whose statements will be logged as a supplement to statements logged for other reasons.
The minimum value is
0.0; the maximum value is1.0; the default value is0.0.This feature is supported by PostgreSQL starting from version 12.
For more information, see this PostgreSQL guide
. -
Logical decoding work mem
All interfacesMaximum memory (in bytes) allocated for logical decoding
before writing to a local storage. This setting limits the amount of memory used by the logical replicatoin connection.The minimum value is
65536(64 KB), the maximum is1099511627776(1 TB), and the default is67108864(64 MB).This feature is supported by PostgreSQL starting from version 13.
For more information, see this PostgreSQL guide
. -
Maintenance io concurrency
All interfacesMaximum concurrent disk I/O operations per session during PostgreSQL maintenance involving
VACUUM,CREATE INDEX, andALTER TABLE ADD FOREIGN KEYstatements. Increasing this value will allow more PostgreSQL maintenance statements to run in parallel.The minimum value is
0, the maximum is1000, and the default is10.This feature is supported by PostgreSQL starting from version 13.
For more information, see this PostgreSQL guide
. -
Maintenance work mem
All interfacesMaximum memory (in bytes) available for PostgreSQL maintenance operations, such as
VACUUM,CREATE INDEX, andALTER TABLE ADD FOREIGN KEY. The value must be a multiple of 1,024.The minimum value is
1048576(1 MB), the maximum is137438953472(128 GB), and the default is67108864(64 MB).For more information, see this PostgreSQL guide
. -
Max connections
Management consoleAPICLITerraformMaximum simultaneous PostgreSQL host connections.
The minimum value is
1. The maximum and default values depend on the selected host class and are calculated as follows:200 × <number_of_vCPUs_per_host>Hosts with a guaranteed vCPU share below 100% (
burstable) use the fixed maximum value of200.By default, the system uses the maximum value.
Warning
Managed Service for PostgreSQL reserves 15 connections for service users per PostgreSQL host. For example, if the cluster has Max connections
100, you can reserve a maximum of 85 connections for cluster users.For more information, see this PostgreSQL guide
. -
Max locks per transaction
Management consoleAPICLITerraformAverage number of objects that can be locked by a single transaction. Individual transactions can lock more objects as long as the total number of objects locked by all transactions fits in the lock table.
The minimum value is
10, the maximum is2147483647, and the default is64.For more information, see this PostgreSQL guide
. -
Max logical replication workers
Management consoleMaximum number of PostgreSQL logical replication processes.
This setting can range from
4to100. By default, the system uses the minimum value.For more information, see this PostgreSQL guide
. -
Max parallel maintenance workers
All interfacesMaximum number of parallel PostgreSQL processes that can be initiated by a single maintenance statement, e.g.,
CREATE INDEX.The minimum value is
0, the maximum is1024, and the default is2.For more information, see this PostgreSQL guide
. -
Max parallel workers
All interfacesMaximum number of parallel PostgreSQL processes.
The minimum value is
0, the maximum is1024, and the default is8.For more information, see this PostgreSQL guide
. -
Max parallel workers per gather
All interfacesMaximum number of parallel processes that can be launched by a single Gather
node.The minimum value is
0; the maximum value is1024; the default value is2.For more information, see this PostgreSQL guide
. -
Max pred locks per transaction
Management consoleAPICLITerraformAverage number of objects lockable by predicate locks
per transaction. Individual transactions can lock more objects than specified as long as the total number of objects locked by all transactions fits in the lock table.The minimum value is
10, the maximum is2147483647(2 GB), and the default is64.For more information, see this PostgreSQL guide
. -
Max prepared transactions
Management consoleAPICLITerraformMaximum number of transactions that can be in a prepared state
simultaneously.The minimum value is
0, the maximum is262143, and the default is0.For more information, see this PostgreSQL guide
. -
Max replication slots
Management consoleMaximum number of replication slots
. Replication slots automatically ensure that WAL (Write-Ahead Log) files are preserved until they have been received by all replicas.This setting can range from
20to100. By default, the system uses the minimum value.For more information, see this PostgreSQL guide
. -
Max slot wal keep size
Management consoleAPITerraformMaximum size (in bytes) of the Write-Ahead Log (WAL)
files stored on the master host during replication.The minimum value is
67108864(64 MB), the maximum is 50% of the storage size, and the default is-1(unlimited). This value must be a multiple of 1,024.This feature is supported by PostgreSQL starting from version 13.
For more information, see this PostgreSQL guide
. -
Max standby streaming delay
All interfacesThe timeout period (in milliseconds) before a hot standby replica begins terminating the queries conflicting with pending WAL
updates.The minimum value is
-1(unlimited waiting time), the maximum is2147483647, and the default is30000(30 seconds).For more information, see this PostgreSQL guide
. -
Max wal senders
Management consoleMaximum number of parallel connections allowed from replication source hosts.
This setting can range from
20to100. By default, the system uses the minimum value.For more information, see this PostgreSQL guide
. -
Max wal size
All interfacesMaximum WAL
file size (in bytes) that triggers automatic checkpoints.The minimum value is
2. The maximum value equals 10% of the storage size, capped at8589934592(8 GB). By default, the system uses the maximum value.For more information, see this PostgreSQL guide
. -
Max worker processes
Management consoleAPICLITerraformMaximum number of PostgreSQL background processes that can be run on the current system.
The minimum value is
0; the maximum value is1024; the default value is8.For more information, see this PostgreSQL guide
. -
Min wal size
All interfacesWAL
disk usage threshold (in bytes) triggering the deletion of old WAL files during checkpoints.The minimum value is
2. The maximum value equals 5% of the storage size, capped at1073741824(1 GB). By default, the system uses the maximum value.For more information, see this PostgreSQL guide
. -
Old snapshot threshold
Management consoleAPICLITerraformMinimum time (in milliseconds) a snapshot can be safely used for query execution without risk of an error.
The minimum and default values are
-1(unlimited), and the maximum is86400000(24 hours).For more information, see this PostgreSQL guide
. -
Online analyze enable
Management consoleAPIEnables the
online_analyzemodule, which updates statistics after theINSERT,UPDATE,DELETE, andSELECT INTOoperations on the target tables. -
Operator precedence warning
All interfacesEnables the query parser to issue warnings for all constructs whose behavior changed due to the precedence rule updates in version 9.5.
This setting is disabled by default.
Support for this feature was removed in PostgreSQL version 14.
For more information, see this PostgreSQL guide
. -
Parallel leader participation
All interfacesAllows the leader process to execute sections of the query plan below Gather and Gather Merge nodes without waiting for worker processes.
This setting is enabled by default.
For more information, see this PostgreSQL guide
. -
Pg hint plan debug print
Management consoleAPITerraformDebug output configuration and verbosity for the
pg_hint_planmodule. This setting only applies when Pg hint plan enable hint is enabled. The possible values, in ascending order of verbosity, are:off(PG_HINT_PLAN_DEBUG_PRINT_OFFfor Terraform and API): The output is disabled.on(PG_HINT_PLAN_DEBUG_PRINT_ONfor Terraform and API): Default.detailed(PG_HINT_PLAN_DEBUG_PRINT_DETAILEDfor Terraform and API).verbose(PG_HINT_PLAN_DEBUG_PRINT_VERBOSEfor Terraform and API).
-
Pg hint plan enable hint
Management consoleAPITerraformEnables the
pg_hint_planmodule, which adjusts automatic query plans by applyinghints
written as simple directives within special SQL comments. -
Pg hint plan enable hint table
Management consoleAPITerraformEnables the use of the
hint_plan.hintstable containinghints
for thepg_hint_planmodule that you can use when you cannot modify queries. This table has the following columns:id: Unique row ID of ahint
. This column is populated automatically.norm_query_string: Pattern for selecting queries targeted by thehint
. Replace constants with the?character. Whitespace characters are treated as part of the pattern and affect matching .application_name: Initiating application for the sessions where thehint
applies.hint:Hints
not wrapped in comment markers.
-
Pg hint plan message level
Management consoleAPITerraformVerbosity level for the
pg_hint_plandebug messages written to the PostgreSQL log. This setting only applies when Pg hint plan enable hint is enabled. The possible values are:errorwarningnoticeinfo(default)logdebug
-
Pg qualstats enabled
Management consoleAPICLIEnables the
pg_qualstatsmodule to collect statistics on predicates inWHEREoperators andJOINblocks. This setting is used to analyze the most frequently evaluated query predicates. -
Pg qualstats max
Management consoleAPICLIMaximum number of predicates tracked by the
pg_qualstatsmodule. This setting only applies when Pg qualstats enabled is on.The minimum value is
100, the maximum is2147483647, and the default is1000. -
Pg qualstats resolve oids
Management consoleAPICLIEnables table
OID-to-name recovery during query statistics collection for thepg_qualstatsmodule. This setting simplifies data analysis, but requires more disk space to store statistics. This setting only applies when Pg qualstats enabled is on.This setting is disabled by default.
-
Pg qualstats sample rate
Management consoleAPICLIFraction of queries (0-1) for which statistics are collected by the
pg_qualstatsmodule. This setting only applies when Pg qualstats enabled is on. Special setting values:0: Disables the setting.1: All queries are analyzed.-1: Automatic mode. The sampling rate is the reciprocal of the Max connections setting and depends on the selected host class.
The default value is
-1. -
Pg qualstats track constants
Management consoleAPICLIEnables tracking of previously encountered predicates in subsequent queries during statistics collection by the
pg_qualstatsmodule. This setting only applies when Pg qualstats enabled is on.This setting is enabled by default.
-
Plan cache mode
Management consoleAPITerraformDetermines the query plan type, i.e., generic or custom, that will be used to execute prepared statements
. The possible values are:auto(PLAN_CACHE_MODE_AUTOfor Terraform and API): Automatic selection.force_custom_plan(PLAN_CACHE_MODE_FORCE_CUSTOM_PLANfor Terraform and API): Forces the use of custom plans.force_generic_plan(PLAN_CACHE_MODE_FORCE_GENERIC_PLANfor Terraform and API): Forces the use of generic plans.
The default value is
auto.This feature is supported by PostgreSQL starting from version 12.
For more information, see this PostgreSQL guide
. -
Plantuner fix empty table
Management consoleAPIAllows the
plantunermodule to hide individual indexes from the planner to prevent their use in query plans.This setting is disabled by default.
-
Quote all identifiers
All interfacesForces quoting all identifiers in SQL queries generated from a database, e.g., during an
EXPLAINoperation.This setting is disabled by default.
For more information, see this PostgreSQL guide
. -
Random page cost
All interfacesDefines the planner's estimated cost of reading one arbitrary disk page. If this setting’s value is less than Seq page cost, the planner will favor index scans.
The minimum value is
0and the default is1.For more information, see this PostgreSQL guide
. -
Row security
All interfacesManages processing of queries subject to at least one row-level security policy
. If you disable this setting, such queries will return an error.This setting is enabled by default.
For more information, see this PostgreSQL guide
. -
Search path
All interfacesComma-separated list of database schema names. When accessing objects in these schemas, the schema name can be omitted.
The default value is
$user, public, i.e., the current user’s schema and thepublicschema.For more information, see this PostgreSQL guide
. -
Seq page cost
All interfacesDefines the planner's estimated cost of reding one page from disk during a series of sequential reads.
The minimum value is
0and the default is1.For more information, see this PostgreSQL guide
. -
Session duration timeout
Management consoleAPICLIMaximum TTL (in ms) of the longest active session or transaction. This setting only applies to sessions with the
activeoridle in transactionstatus.To prevent this setting from impacting cluster performance, the system checks the longest transaction/session at certain intervals. The interval between checks is chosen randomly within a range of 5 to 10 minutes. For example, if you set this parameter to
1000, a session will terminate within 1 second + 5 to 10 minutes.A value higher than default may increase the database size and slow down the operating system.
The minimum value is
0(no limit on active session/transaction TTL), the maximum value is2147483647, and the default is43200000(12 hours). The minimum adjustment granularity for this setting is1000.Learn more about session statuses in this PostgreSQL guide
. -
Shared buffers
Management consoleAPICLITerraformMemory (in bytes) that PostgreSQL can use for shared memory buffers.
The minimum value is
131072(128 KB). The maximum value depends on the selected host class and is equal to 80% of the Managed Service for PostgreSQL cluster host's total RAM. The default value is set to 25% of the total RAM, capped at 8 GB.For more information, see this PostgreSQL guide
. -
Shared preload libraries
Management consoleAPITerraformComma-separated list of shared libraries to load upon PostgreSQL server startup. These libraries are required for some PostgreSQL extensions.
For more information, see this PostgreSQL guide
. -
Standard conforming strings
Management consoleAPITerraformEnables interpreting backslashes (
\) in regular string constants ('...') as a literal rather than a special character, as per SQL standard.This setting is on by default.
For more information, see this PostgreSQL guide
. -
Statement timeout
Management consoleAPICLITerraformMaximum statement runtime (in ms) before it is aborted.
The minimum value is
0; the maximum value is2147483647; the default value is0.For more information, see this PostgreSQL guide
. -
Synchronize seqscans
All interfacesEnables synchronized scanning for large table sequential scans, causing concurrent operations to read the same block at roughly the same time. When this setting is disabled, a sequential scan will always start from the beginning of the table, reverting to pre-8.3 behavior.
This setting is enabled by default.
For more information, see this PostgreSQL guide
. -
Synchronous commit
All interfacesDetermines the WAL
processing stage at which a transaction is considered committed.Values for this setting can range:
Management console/CLITerraformAPIon: Transaction is committed once its WAL record is written both to the master’s disk and to the disks of every quorum replica.off: Transaction is committed even if its data has not yet been flushed to WAL. Due to the asynchronous nature of writes, transaction data in this case can be lost in the event of a disk subsystem failure.local: Transaction is committed once its WAL record is written to the master’s disk.remote_write: Transaction is committed once its WAL record is written to the master’s disk and all quorum replicas have received the WAL and provided it to the OS for writing to disk. If the master’s disk fails and the operating systems on quorum replicas crash, transaction data with this synchronization level can be lost.remote_apply: Transaction is committed once its WAL record is written to the master’s disk and all quorum replicas have received the WAL and applied the changes it contains.
The default value is
on.1or"SYNCHRONOUS_COMMIT_ON": Transaction is committed once its WAL record is written both to the master’s disk and to the disks of every quorum replica.2or"SYNCHRONOUS_COMMIT_OFF": Transaction is committed even if its data is not yet in the WAL. Due to the asynchronous nature of writes, transaction data in this case can be lost in the event of a disk subsystem failure.3or"SYNCHRONOUS_COMMIT_LOCAL": Transaction is committed if the WAL is written to the master disk.4or"SYNCHRONOUS_COMMIT_REMOTE_WRITE": Transaction is committed once its WAL record is written to the master’s disk and all quorum replicas have received the WAL and provided it to the OS for writing to disk. If the master’s disk fails and the operating systems on quorum replicas crash, transaction data with this synchronization level can be lost.5or"SYNCHRONOUS_COMMIT_REMOTE_APPLY": Transaction is committed once its WAL record is written to the master’s disk and all quorum replica have received the WAL and applied the changes it contains.
The default value is
"SYNCHRONOUS_COMMIT_ON".SYNCHRONOUS_COMMIT_ON: Transaction is committed once its WAL record is written both to the master’s disk and to the disks of every quorum replica.SYNCHRONOUS_COMMIT_OFF: Transaction is committed even if its data has not yet been flushed to WAL. Due to the asynchronous nature of writes, transaction data in this case can be lost in the event of a disk subsystem failure.SYNCHRONOUS_COMMIT_LOCAL: Transaction is committed once its WAL record is written to the master’s disk.SYNCHRONOUS_COMMIT_REMOTE_WRITE: Transaction is committed once its WAL record is written to the master’s disk and all quorum replicas have received the WAL and provided it to the OS for writing to disk. If the master’s disk fails and the operating systems on quorum replicas crash, transaction data with this synchronization level can be lost.SYNCHRONOUS_COMMIT_REMOTE_APPLY: Transaction is committed once its WAL record is written to the master’s disk and all quorum replicas have received the WAL and applied the changes it contains.
The default value is
SYNCHRONOUS_COMMIT_ON.For more information, see this PostgreSQL guide
.The setting applies at the Managed Service for PostgreSQL cluster level, but can be overridden for individual users.
-
Temp buffers
All interfacesMaximum memory (in bytes) allocated for temporary buffers in each session.
The minimum value is
100, the maximum is1073741823(1 GB), and the default is8388608(8 MB).For more information, see this PostgreSQL guide
. -
Temp file limit
Management consoleAPICLITerraformMaximum amount of disk space (in bytes) a single process can use for temporary files. A transaction that tries to exceed this limit will be canceled.
Large queries are executed in the disk space rather than in RAM. Queries that are too large overload the disk and prevent other queries from being executed. The setting prevents queries that degrade performance by limiting the size of temporary files.
The minimum value is
-1(no limits); the maximum value is2147483647(2 GB); the default value is-1.For more information, see this PostgreSQL guide
.The setting applies at the Managed Service for PostgreSQL cluster level, but can be overridden for individual users.
-
Timezone
All interfacesTimezone for time output and input.
The default value is
Europe/Moscow.For more information, see this PostgreSQL guide
. -
Track activity query size
Management consoleAPITerraformMemory (in bytes) reserved in each active session for the text of the statement currently being executed.
The minimum value is
100, the maximum is102400, and the default is1024.For more information, see this PostgreSQL guide
. -
Transform null equals
All interfacesEnables treating the condition
expression = NULLasexpression IS NULL. The condition is true if the expression has theNULLvalue, otherwise it is false. According to the SQL standard,expression = NULLalways returnsNULL(unknown value).This setting is disabled by default (the SQL standard applies).
For more information, see this PostgreSQL guide
. -
Vacuum cleanup index scale factor
All interfacesShare of index rows used in the previous statistics. During the
VACUUMoperation, the index statistics are considered obsolete if the ratio of newly inserted rows to the total number of rows in the index exceeds the specified value. In this case, the index will be re-scanned.The minimum value is
0.0, the maximum is10000000000.0, and the default is0.1.Support for this feature was removed in PostgreSQL version 14.
For more information, see this PostgreSQL guide
. -
Vacuum cost delay
All interfacesTime (in milliseconds) the
VACUUMandANALYZEoperations will remain idle if the cost limit is exceeded (see Vacuum cost limit).The minimum value is
0, the maximum is100, and the default is0.For more information, see this PostgreSQL guide
. -
Vacuum cost limit
All interfacesAccumulated cost threshold at which the
VACUUMprocess will go idle (sleep mode).The minimum value is
1, the maximum is10000, and the default is200.For more information, see this PostgreSQL guide
. -
Vacuum cost page dirty
All interfacesNotional cost of a
VACUUMoperation that modifies a block not modified before.The minimum value is
0, the maximum is10000, and the default is20.For more information, see this PostgreSQL guide
. -
Vacuum cost page hit
All interfacesNotional cost of vacuuming a buffer found in shared cache.
The minimum value is
0, the maximum is10000, and the default is1.For more information, see this PostgreSQL guide
. -
Vacuum cost page miss
All interfacesNotional cost of vacuuming a buffer that has to be read from a disk.
The minimum value is
0, the maximum is10000, and the default is10.For more information, see this PostgreSQL guide
. -
Vacuum failsafe age
Management consoleAPICLIMaximum age of
frozen
(already completed) transaction measured as the number of transactions initiated after it. As soon as this value is reached, theVACUUMprocess runs vacuuming to avoid transaction counter overflow.The minimum value is
0, the maximum is2100000000, and the default is1600000000.This feature is supported by PostgreSQL starting from version 14.
For more information, see this PostgreSQL guide
. -
Vacuum multixact failsafe age
Management consoleAPICLIMaximum age of
frozen
(already completed) multi-transaction measured as the number of multi-transactions initiated after it. As soon as this value is reached, theVACUUMprocess runs vacuuming to avoid multi-transaction counter overflow.The minimum value is
0, the maximum is2100000000, and the default is1600000000.This feature is supported by PostgreSQL starting from version 14.
For more information, see this PostgreSQL guide
. -
Wal keep size
Management consoleAPITerraformMinimum size (in bytes) of obsolete log segments kept in the WAL
directory for replicas to download, if required.The minimum value is
0(past segments are not saved for replication); the maximum value is2251799812636672(2 TB); the default value is0.This feature is supported by PostgreSQL starting from version 13.
For more information, see this PostgreSQL guide
. -
Work mem
All interfacesBasic memory (in bytes) available for internal query processing operations (e.g., sorting or hash tables) before making use of temporary files on disk.
The minimum value is
64, the maximum is2147483647(2 GB), and the default is4194304(4 MB).For more information, see this PostgreSQL guide
. -
Xmlbinary
All interfacesMethod used for encoding binary data in XML. The possible values are:
base64(XML_BINARY_BASE64for Terraform, CLI, and API): BASE64 encoding.hex(XML_BINARY_HEXfor Terraform, API, and CLI): Hexadecimal encoding.
The default value is
base64.For more information, see this PostgreSQL guide
. -
Xmloption
All interfacesDefault type of conversion between XML and character data. The possible values are:
document(XML_OPTION_DOCUMENTfor Terraform, CLI, and API): XML document.content(XML_OPTION_CONTENTfor Terraform, CLI, and API): XML document fragment.
The default value is
content.For more information, see this PostgreSQL guide
.
User-level settings
These settings affect the behavior of PostgreSQL when handling user queries:
-
Catchup timeout
Management consoleTerraformAPIThe maximum allowed replica's lag behind the master (in seconds).
If the setting has a non-zero value, the Odyssey connection pooler will not allow connections to replicas lagging far behind the master. This prevents reading stale data from such replicas.
Odyssey regularly requests information about lagging replicas from the cluster. When attempting to connect to a replica whose lag exceeds the setting value, the connection will be terminated. Odyssey will return the following message:
remote server read/write error: failed to wait replica for catchupThe minimum and default value is
0(allows connecting to any replica regardless of its lag behind the master). -
Conn limit
Management consoleAPICLIIn transaction pooling, this setting limits the number of simultaneous active connections per user. When using this type of pooling, the user can open thousands of connections, but only
Nconnections can run concurrently (whereNis the setting value).In session pooling, the setting limits the number of user connections to each host in a PostgreSQL cluster. When using this type of pooling, make sure the setting value is not less than the sum of all connections that can be opened by the user service backends. Each open server connection slightly slows down the OLTP performance for PostgreSQL.
The following principles apply to session pooling:
-
When adding a user, Managed Service for PostgreSQL reserves 50 connections per host in a PostgreSQL cluster by default. The minimum number of connections per user is 1.
-
The total number of connections reserved for users must not exceed the value of the Max connections parameter. Managed Service for PostgreSQL reserves 15 service connections per host.
For example, if the cluster is set to
"max_connections": 100, you can reserve a maximum of 85 connections per cluster host for users. -
We recommend distributing services that use PostgreSQL across different users and setting the required value for each user. If issues in one service lead to creating a large number of connections, other services will not be affected and will be able to connect to PostgreSQL.
The setting depends on the selected host class.
-
-
Default transaction isolation
Management consoleAPICLISee the description of the Default transaction isolation cluster-level setting.
-
Grants
Management consoleAPICLITerraformRoles granted to the user.
-
Lock timeout
Management consoleAPICLISee the description of the Lock timeout cluster-level setting.
-
Log min duration statement
Management consoleAPICLISee the description of the Log min duration statement cluster-level setting.
We recommend you to define the meaning of slow query execution for each service and its user and log only the queries that meet the definition. For example, for a web service, a query is slow if it runs for more than one second, while, for the reporting service, it is a query that runs for more than 10 minutes.
For more information, see this PostgreSQL article
. -
Log statement
Management consoleAPICLISee the description of the Log statement cluster-level setting.
-
Login
Management consoleAPICLIWhether or not the user can connect to the PostgreSQL cluster.
Default value:
true(the user can connect to the cluster). -
Pg audit log
Management consoleDefines which user queries will be written to the audit log.
The setting is only valid if:
pgauditlibrary is connected to the cluster.pgauditextension is enabled for the database.
The allowed values are:
read:SELECTandCOPYqueries are logged if the data source is a relation or query.write:INSERT,UPDATE,DELETE,TRUNCATE, andCOPYqueries are logged if the data source is a relation.function: Function invocations andDOsections are logged.role: Statements related to role and privilege management, such asGRANT,REVOKE, orCREATE/ALTER/DROP ROLE, are logged.ddl: AllDDLstatements not belonging to theROLEclass are logged.misc: Auxiliary commands, such asDISCARD,FETCH,CHECKPOINT,VACUUM, andSET, are logged.misc_set: TheSETauxiliary commands, such asSET ROLE, are logged.
You can select multiple values. By default, audit logs are disabled for the user.
For more information about setting up audit logs, see Using pgaudit.
-
Pooling mode
Management consoleTerraformAPINote
- Terraform and the gRPC API use the
pool_modesetting name. - In the REST API, the
poolModesetting name is used.
Connection management mode used by the Odyssey connection pooler.
The allowed values are:
SESSION: Session mode.TRANSACTION: Transaction mode.STATEMENT: Query mode.
The default value is
SESSION. - Terraform and the gRPC API use the
-
Prepared statements pooling
Management consoleAllows using prepared statements with merged transactions.
-
Synchronous commit
Management consoleAPICLISee the description of the Synchronous commit cluster-level setting.
-
Temp file limit
Management consoleAPICLISee the description of the Temp file limit cluster-level setting.
-
Wal sender timeout
Management consoleTime, in milliseconds, after which inactive replication connections are terminated.
This feature is supported by PostgreSQL starting from version 12.