Log collection

While most server startup scripts will save the log file output that the server writes for you, that's typically going to be into a single file, such as how RedHat systems create a pg_startup.log for you.

The parameter shown in all these examples as logging_collector was renamed in PostgreSQL 8.3. Before then, it was known as redirect_stderr. The change in name reflects the fact that it's also used to redirect for the csvlog format in addition to stderr as of that version. The new parameter has the same basic behavior.

If you want to save log files for query analysis, or you just want the log files to be created in batches (per day by default), you'll want to turn the logging_collector parameter on. Afterwards, instead of a ...

Get PostgreSQL 10 High Performance 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.