tencent cloud

All product documents
TencentDB for PostgreSQL
Execution Log Management
Last updated: 2024-03-20 14:27:25
Execution Log Management
Last updated: 2024-03-20 14:27:25
This document introduces how to manage the retention duration of pg_log.

Introduction to PG_LOG

pg_log typically records the status information of the database, such as error information, slow log SQL, database startup and shutdown information, etc. This log will be automatically segmented by size and time, and the pg_log of TencentDB for PostgreSQL is retained by default for 30 days. pg_log will occupy the storage space of the database instance, and you can modify the retention duration based on your needs.
Note:
The slow log and error log of the database instance are retained for 7 days by default. Modifying the pg_log retention duration does not affect the slow log and error log retention duration.

Modifying PG_LOG Retention Duration

You can modify the pg_log retention duration based on your needs. The system currently supports two options: 7 days and 30 days. The detailed steps are as follows:
2. Find the instance you need to modify in the instance list, click Operation > Management to enter the instance details.
3. Find Parameter Setting in the Instance detail page, search for the parameter log_filename in the upper right corner and update it.
The introduction for the log_filename parameter is as follows:
Parameter Value
Description
postgresql_%a_%H.log
Selecting this value will keep logs for 7 days.
postgresql_%d_%H.log
Selecting this value allows logs to be retained for 30 days, which is the system default.

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon