RDS for PostgreSQL
Parameter name | Default value | Unit | Need restart? | Type | Value range | Versions supporting this parameter | Chinese description |
auto_explain.log_analyze | off | - | No | bool | [on|off] | PostgreSQL 11~17 | Enable the sampling of EXPLAIN ANALYZE output. |
auto_explain.log_buffers | off | - | No | bool | [on|off] | PostgreSQL 11~17 | Enable logging of buffer usage information. |
auto_explain.log_format | text | - | No | enum | [text|xml|json|yaml] | PostgreSQL 11~17 | Used for setting the output format of EXPLAIN in planned log recording. |
auto_explain.log_min_duration | -1 | ms | No | integer | [-1~60000] | PostgreSQL 11~17 | Plans that exceed the set duration will be logged. Setting it to 0 will log all plans, while setting it to -1 will disable this feature. |
auto_explain.log_nested_statements | off | - | No | bool | [on|off] | PostgreSQL 11~17 | Enable logging of nested statements. |
auto_explain.log_timing | on | - | No | bool | [on|off] | PostgreSQL 11~17 | When logging the execution plan, enable the execution plan for each detailed node time. |
auto_explain.log_triggers | off | - | No | bool | [on|off] | PostgreSQL 11~17 | Enable scheduled trigger statistics logging. Unless auto_explain.log_analyze is enabled, this parameter is ineffective. By default, the value of this parameter is off. |
auto_explain.log_verbose | off | - | No | bool | [on|off] | PostgreSQL 11~17 | Enable detailed output of auto-explain, which is equivalent to the VERBOSE option of EXPLAIN. |
auto_explain.sample_rate | 1 | - | No | real | [0~1] | PostgreSQL 11~17 | Set the sampling rate for queries to be logged. 0 means disabled, 1 means record all queries. |
autovacuum_vacuum_cost_delay | 0 | ms | No | PostgreSQL 12~16:real PostgreSQL 11:integer | [0~50] | PostgreSQL 11~17 | In AUTOVACUUM, the time to wait after executing each cost (in milliseconds). |
cron.log_run | on | - | Yes | bool | [off|on] | PostgreSQL 11~17 | Record every job run in the job_run_details table. |
default_transaction_deferrable | off | - | No | bool | [off|on] | PostgreSQL 11~17 | Set the default deferrable status for new transactions. |
effective_cache_size | instance memory * 50% | 8 KB | No | integer | [1-2147483647] | PostgreSQL 11~17 | Set the estimated disk buffer usage for a single query by the query optimizer. |
enable_partitionwise_aggregate | on | - | No | bool | [off|on] | PostgreSQL 11~17 | Enable partitioned aggregation and grouping. |
enable_partitionwise_join | on | - | No | bool | [off|on] | PostgreSQL 11~17 | Enable partitioned joining. |
idle_in_transaction_session_timeout | 36000000 | ms | No | integer | [3000~36000000] | PostgreSQL 11~17 | Set the maximum allowed idle time between queries in a transaction. Terminate any open transaction sessions that have been idle beyond the specified time. When the value is 0, turn off the timeout. |
lc_monetary | C | - | No | string | [C|C.UTF-8|en_US.utf8|POSIX|zh_CN.utf8] | PostgreSQL 11~17 | Set the locale for formatting monetary amounts. |
lock_timeout | 0 | ms | No | integer | [0~36000000] | PostgreSQL 11~17 | Set the maximum allowed duration for waiting for locks. When the value is 0, turn off the timeout. |
log_autovacuum_min_duration | 10000 | ms | No | integer | [-1~2147483647] | PostgreSQL 11~17 | Set the minimum execution time for the Actions to be logged automatically. When the value is 0, print all Actions. When the value is -1, turn off the automatic cleanup logging. |
log_connections | off | - | No | bool | [off|on] | PostgreSQL 11~17 | Record every successful connection. |
log_disconnections | off | - | No | bool | [off|on] | PostgreSQL 11~17 | Record the session end, including duration. |
log_min_duration_statement | 1000 | ms | No | integer | [-1~600000] | PostgreSQL 11~17 | SQL exceeding this duration will be logged. Please note that too small a value may cause performance degradation and increase the volume of logs. |
log_statement | ddl | - | No | enum | [ddl|mod|all] | PostgreSQL 11~17 | Set the type of statements to be logged. Setting it to all or mod will cause the performance to drop and increase the log volume. |
log_temp_files | 131072 | KB | No | integer | [-1|0|4096~1048576] | PostgreSQL 11~17 | Set the threshold of the actual size of temporary files. When the size of temporary files exceeds the threshold, the path where the temporary files are located and the disk space occupied are printed. When set to 0, it means that the paths and space occupied by all temporary files are recorded in the log; when set to -1, the paths and space occupied by all temporary files are not recorded in the log. |
max_standby_archive_delay | 300000 | ms | No | integer | [-1~2147483647] | PostgreSQL 11~17 | Set the maximum delay before cancelling queries when dealing with archived WAL data on a hot standby server. |
max_standby_streaming_delay | 300000 | ms | No | integer | [-1~2147483647] | PostgreSQL 11~17 | Set the maximum delay before cancelling queries when handling streaming WAL data on a hot standby server. |
pgaudit.log_catalog | on | - | No | bool | [off|on] | PostgreSQL 11~17 | Enable session log recording when all relations specified in the statement are in pg_catalog. Disabling this setting will reduce log noise from tools that perform extensive query catalogs such as psql and PgAdmin. |
pgaudit.log_level | log | - | No | string | [debug5|debug4|debug3|debug2|debug1|info|notice|warning|log] | PostgreSQL 11~17 | Specify the log level to be used for log entries. This setting is used for regression testing, and may also be useful for final user testing or other purposes. It is not suitable for production environments, as it may reveal which statements are being logged to the user. |
pgaudit.log_parameter | off | - | No | bool | [off|on] | PostgreSQL 11~17 | Designated audit log records should include parameters passed with the statements. When parameters are present, they will be included in CSV format following the statement text. |
pgaudit.log_relation | off | - | No | bool | [off|on] | PostgreSQL 11~17 | Designate whether the session audit log should create separate log entries for each relation referenced in SELECT or DML statements. This is a useful shortcut for detailed logging without using object audit logs. |
pgaudit.log_statement_once | off | - | No | bool | [off|on] | PostgreSQL 11~17 | Specifies whether the logging will include the statement text and parameters in the first log entry of the statement/substatement combination or in each entry. Disabling this setting will result in less detailed logging, but it may make it more difficult to determine the statement that generated the log entry, although the statement/substatement pair and process ID should be sufficient to identify the statement text recorded with the previous entry. |
pgaudit.role | - | - | No | string | [*] | PostgreSQL 11~17 | Specify the primary role for object audit logging. It can be defined by granting multiple audit roles to the primary role. This allows multiple groups to be responsible for different aspects of audit logging. The range of values for this parameter consists of database users created by clients, used in object auditing, mainly auditing the respective access behaviors to the database objects for which the user has SELECT, INSERT, UPDATE, or DELETE permissions. After configuring this parameter, if other users access the database objects of this user, the access behaviors of other users will be recorded in the audit log. Note that the cloud database PostgreSQL edition console does not verify the users input. If the inputted user exists and the permissions are effective, then the audit rules are effective; if the inputted user does not exist or the permissions are not effective, then the audit rules are ineffective. |
shared_preload_libraries | auth_delay,pg_stat_statements,auto_explain,pgaudit,pgnodemx | - | Yes | string | [*auth_delay|pg_stat_statements|auto_explain|pgaudit|pgnodemx|pg_pathman|timescaledb|pg_stat_kcache|pg_hugepage_stat|pg_cron|pg_jieba] | PostgreSQL 11~17 | List the shared libraries to be preloaded into the server. The description supports only versions PostgreSQL 11~13 for setting shared_preload_libraries to pg_pathman. The value of shared_preload_libraries needs to be consistent with the plugins actually used. Before modifying the parameter to remove certain plugins, please ensure that you have dropped the corresponding plugins. If you previously removed some plugins that are being used from the shared_preload_libraries parameter, it is advisable to add them back to the shared_preload_libraries parameter as soon as possible, otherwise errors may occur, affecting database read and write operations. |
statement_timeout | 0 | ms | No | integer | [0-86400000] | PostgreSQL 11~17 | Set the maximum execution time for SQL statements, setting it to 0 means there is no timeout limit. |
slow_query_custom_count_range | 60 | - | No | integer | [60-3600] | PostgreSQL 11~17 | Used to set the time range for slow query counts. Set the time range in seconds. If set to 60, it indicates the number of slow queries in the past 60 seconds. |
temp_file_limit | -1 | KiB | No | integer | [-1,2097152-instance storage space*80%] tip If the instance storage space is 200GB, the upper limit of the temp_file_limit is 200 * 1000 * 1000 * 1000/1024 * 0.8 = 156250000. | PostgreSQL 11~17 | Specifies the maximum disk space for temporary files that a process can use. tip -1 means no limit on the disk space used by temporary files of the process. |
timezone | Asia/Shanghai | - | No | string | PostgreSQL 11~17 | Set the time zone for displaying and interpreting timestamps. | |
track_commit_timestamp | off | - | Yes | bool | [off|on] | PostgreSQL 11~17 | Enable the collection of transaction commit times. |
vacuum_defer_cleanup_age | 0 | - | No | integer | [0-1000000] | PostgreSQL 11~15 | The number of transactions that should defer VACUUM and HOT cleanup (if any). |
wal_compression | off | - | No | enum | PostgreSQL 11~14:[off|on] PostgreSQL 15~16:[off|pglz|lz4] | PostgreSQL 11~17 | Compress full page writes into WAL. |
wal_level | replica | - | Yes | enum | [replica|logical] | PostgreSQL 11~17 | Set the information level for writing to WAL. |