Ensure that "log_disconnections" database parameter is enabled for all PostgreSQL database instances provisioned with RDS in your Alibaba Cloud account. The "log_disconnections" parameter enables the logging of session termination. The log output provides information similar to the one generated by the "log_connections" parameter, plus the duration of the session. By default, the "log_disconnections" parameter is disabled.
If the "log_disconnections" parameter is enabled, RDS starts recording PostgreSQL activity that can be useful to identify, troubleshoot, and repair configuration errors and sub-optimal performance for your PostgreSQL database instances.
Audit
To determine if "log_disconnections" parameter is enabled for your RDS PostgreSQL database instances, perform the following operations:
Remediation / Resolution
To enable the "log_disconnections" 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