Configuring the postgresql.conf file

In this section, we will go through some of the most important entries in the postgresql.conf file to configure logging and see how logging can be used in the most beneficial way.

Before we get started, I want to say a few words about logging in PostgreSQL in general. On Unix systems, PostgreSQL will send log information to stderr by default. However, stderr is not a good place for logs to go because you will surely want to inspect the log stream at some point. Therefore, it really makes sense to work through this chapter to adjust things to your needs.

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.