Chapter 9. Databases and Log Files

Depending on your specific installation, the location of your log and database files will vary. Normally, they are located in the same directory as your base PostgreSQL data files.

On a source-based system, this is usually /usr/local/pgsql/data, and on an RPM-based system, it is usually /var/lib/pgsql/data. However, neither of these locations is the “officially sanctioned” location. The Linux FHS (File-Hierarchy Specification) states that /var/log/pgsql or /var/log/postgres is the proper location for the database. For the following listings, $PGBASE refers to the path where the base system is installed.

Get PostgreSQL Essential Reference 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.