RDS PostgreSQL

RDS-PostgreSQL Parameter Tuning

2024-05-15 08:23:28

1.1.1.   Recommendations

Database parameters are key configurations for the operation of the database system. You need to modify parameters according to official suggestions and in combination with the resource configuration of the instance. Improper parameter settings may adversely affect the database performance. This section describes some important parameters. For more parameter details, see the PostgreSQL official website.

Parameters that May Affect Performance

Some performance parameters are described as follows:

           The parameter log_statement determines the log level for creating records and deleting the database users. The optional values are none, ddl, mod, or all. Improper design may adversely affect the performance of the database. Please configure it according to specific usage scenarios.

           The parameters log_hostname, log_duration, log_connections, and log_disconnections may adversely affect the performance of the database. Please confirm whether to enable them according to the specific usage scenario.

           The reasonable configuration range for parameter shared_buffers is 25% to 40% of the system memory. It is recommended that the maximum value should not exceed 80% of the system memory. A too-high parameter value may adversely affect the performance of the database. Please configure it according to specific usage scenarios.

           The parameter configuration of max_worker_processes is related to the parameter values of max_parallel_workers and max_parallel_workers_per_father. It is recommended to configure it according to business requirements. A too-high parameter value may adversely affect the performance of the database. Exercise caution when configuring it.

Security-sensitive Parameters

Some parameters are described as follows:

           The parameter log_duration is used to record the execution time of each SQL statement. Improper settings can cause SQL statements containing sensitive information to be recorded in the database log. You are advised to disable this parameter.

           The parameter log_min_duration_statement is used to set the minimum execution time. The statements whose execution time is greater than or equal to the value of this parameter are recorded. When the value is 0, it means that all statements are recorded; when the value is -1, it means that no statements are logged.


ZqZq0WnZwGlN