Ensure that "log_duration" database parameter is enabled for all PostgreSQL database instances provisioned with RDS in your Alibaba Cloud account. The "log_duration" parameter allows recording the duration of each completed PostgreSQL statement. Only users with administrative privileges can change this setting within PostgreSQL database instance configuration.
If "log_duration" parameter is enabled, your PostgreSQL database instances can log the duration of each completed SQL statement, which in turn generates query and error logs if any issues are detected. Database query and error logs can be used to identify, troubleshoot, and repair configuration errors and sub-optimal performance for your PostgreSQL database instances.
Audit
To determine if "log_duration" parameter is enabled for your RDS PostgreSQL database instances, perform the following operations:
Remediation / Resolution
To enable the "log_duration" database parameter for your RDS PostgreSQL database instances, perform the following operations:
References
- Alibaba Cloud Documentation
- Modify the parameters of an ApsaraDB RDS for PostgreSQL instance
- Use a parameter template to configure the parameters of ApsaraDB RDS for PostgreSQL instances
- Alibaba Cloud CLI Documentation
- DescribeDBInstances
- DescribeParameters
- ModifyParameter