3.1.34 Ensure 'log_statement_stats' is disabled

Information

Enabling the log_statement_stats setting causes cumulative performance statistics to be written to the server log for each query. This is a crude profiling instrument, similar to the Unix getrusage() operating system facility. This reports total statement statistics. Cumulative performance statistics logging is disabled (off) by default and should only be enabled if directed to do so by your organization's logging policy.
Note: log_statement_stats cannot be enabled together with any of the per-module options.
Rationale:
The logging of these additional statistics when not mandated by your organization's logging policy greatly reduces the signal-to-noise ratio of the PostgreSQL logs.

Solution

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

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: 54e471054ac811bd5be2ee6de8aa73cd16655233afefed8317791ac3fcbd8cc7