Defining log destination and rotation

Let us go through the postgresql.conf file and see what can be done:

#----------------------------------------------------------------- # ERROR REPORTING AND LOGGING #---------------------------------------------------------------- # - Where to Log - #log_destination = 'stderr'                     # Valid values are combinations of                     # stderr, csvlog, syslog, and eventlog,                     # depending on platform. csvlog                     # requires logging_collector to be on. # This is used when logging to stderr: #logging_collector = off                     # Enable capturing of stderr and csvlog                     # into log files. Required to be on for                     # csvlogs.                     # (change requires restart)

The first configuration option defines how the log is processed. By default, it will go to stderr ...

Get Mastering PostgreSQL 10 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.