3.1.15 Ensure 'log_min_duration_statement' is disabled

Information

The log_min_duration_statement setting specifies the minimum execution time for a statement at which the statement will be logged. For example, if you set it to 250ms, then all SQL statements that run 250ms or longer will be logged. Setting it to -1 disables this feature, which is recommended. Setting it to 0 records all statements regardless of duration.
Rationale:
Logging of SQL statements may include sensitive information that should not be recorded in logs.

Solution

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

See Also

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

Item Details

Category: AUDIT AND ACCOUNTABILITY

References: 800-53|AU-6, CSCv6|6, CSCv7|6

Plugin: PostgreSQLDB

Control ID: c1bc12f8a4c840b6f1edb80d40933e151afd0ccdb61076e61ced2b0690d8ce86