3.1.2 Ensure the log destinations are set correctly

Information

PostgreSQL supports several methods for logging server messages, including stderr, csvlog, syslog, and jsonlog. On Windows, eventlog is also supported. One or more of these destinations should be set for server log output.

Rationale:

If log_destination is not set, then any log messages generated by the core PostgreSQL processes will be lost.

Solution

Execute the following SQL statements to remediate this setting (in this example, setting the log destination to csvlog):

postgres=# alter system set log_destination = 'csvlog';
ALTER SYSTEM
postgres=# select pg_reload_conf();
pg_reload_conf
----------------
t
(1 row)

Note: If more than one log destination is to be used, set this parameter to a list of desired log destinations separated by commas (e.g. 'csvlog, stderr').

Default Value:

stderr

See Also

https://workbench.cisecurity.org/benchmarks/17003

Item Details

Category: AUDIT AND ACCOUNTABILITY

References: 800-53|AU-2, 800-53|AU-3, 800-53|AU-3(1), 800-53|AU-7, 800-53|AU-12, CSCv7|6.2, CSCv7|6.3

Plugin: PostgreSQLDB

Control ID: 5307f09d1e4dd6b40177a4294b39bb312b83a9934b991f392b0466bb746881de