RDS PostgreSQL

Log Monitoring

2025-06-17 08:28:14

Slow Logs

Application Scenarios

             The slow log is used to record statements whose execution time exceeds the current slow log threshold. You can find out the statements with low execution efficiency for optimization through the log details and statistical analysis of the slow log.

             The slow log threshold can be set in milliseconds by setting the log_min_duration_statement parameter in Parameters Settings.

Procedure

1.           Log in to the eSurfing Cloud Portal.

2.           Go to the Console.

3.           Select the resource pool area in the upper left corner. For details of the resource pool loaded by RDS-PostgreSQL, see Function Loading Description.

4.           Find RDS-PostgreSQL and click it to go to the Console page.

5.           Select Monitoring > Log Monitoring in the left sidebar to go to the log page.

6.           Click Slow Log at the top of this page to switch to the page to view the slow log.

a.           You can search for the SQL slow statements you want to see by using the SQL keywords in the upper left corner.

b.           You can view slow logs in different time periods through Customize Query Time in the upper left corner.

c.            You can view the slow logs with the time more than the time through Execution Time in the upper left corner.

d.           You can export the slow log table through Export in the upper left corner for further analysis.

Error Logs

Application Scenarios

The error log records the database running time log. You can analyze issues in your system through error logs.

Steps for Viewing Error Logs through Instances

1.           Log in to the eSurfing Cloud Portal.

2.           Go to the Console.

3.           Select the resource pool area in the upper left corner. For details of the resource pool loaded by RDS-PostgreSQL, see Function Loading Description.

4.           Find RDS-PostgreSQL and click it to go to the Console page.

5.           Select Monitoring > Log Monitoring in the left sidebar to go to the log page.

6.           Click Error Log at the top of this page to switch to the page and view the error log.

a.           You can click the Log Level filter box in the upper left corner of the page to view different levels of logs.

b.           You can click Customize Query Time next to the Log Level filter box to view error logs for different time periods.

Switch Log

Application Scenarios

The switch log will record the Master-Slave switching logs of the instance. You can use the switch log to locate the time when the Master-Slave switching occurred and analyze the reason for the Master-Slave switching of the system combined with other information.

Constraints and Restrictions

             Switch logging is only supported for RDS-PostgreSQL primary/standby instances.

Steps for Viewing Switch Logs

1.           Log in to the eSurfing Cloud Portal.

2.           Go to the Console.

3.           Select the resource pool area in the upper left corner. For details of the resource pool loaded by RDS-PostgreSQL, see Function Loading Description.

4.           Find RDS-PostgreSQL and click it to go to the Console page.

5.           Select Monitoring > Log Monitoring in the left sidebar to go to the log page.

6.           Click Switch Log at the top of the page to switch to the page to view the switch log.

a.           You can click the Time filter box in the upper left corner of the page to view switch logs for different time periods.


4Q4vt27bvRYA