3.1.9 Ensure the maximum log file size is set correctly

Information

The log_rotation_size setting determines the maximum size of an individual log file. Once the maximum size is reached, automatic log file rotation will occur.
Rationale:
If this is set to zero, size-triggered creation of new log files is disabled. This will prevent automatic log file rotation when files become too large, which could put log data at increased risk of loss (unless age-based rotation is configured).

Solution

Execute the following SQL statement(s) to remediate this setting (in this example, setting it to 1GB):
postgres=# alter system set log_rotation_size = '1GB';
ALTER SYSTEM
postgres=# select pg_reload_conf();
pg_reload_conf
----------------
t
(1 row)
Default Value:
0

See Also

https://workbench.cisecurity.org/files/2234

Item Details

Category: AUDIT AND ACCOUNTABILITY

References: 800-53|AU-4, CSCv6|6.3, CSCv7|6.4

Plugin: PostgreSQLDB

Control ID: b0cd2f08a6f518fb7f3b62816836c852b9f7d966992ad914f8b8e9f7e01c568b