Where Them
Logs App
WTLA-01

PostgreSQL

3 log locations · Windows, Linux

PostgreSQL Global Development Group

Where PostgreSQL keeps its logs

PostgreSQL logs to C:\Program Files\PostgreSQL\<version>\data\log\ on Windows.

PostgreSQL logs to /var/log/postgresql/postgresql-<version>-main.log on Linux. 1 other Linux log location is recorded below.

Paths are printed exactly as PostgreSQL writes them. Environment variables like %LOCALAPPDATA% and $XDG_STATE_HOME are never expanded, so a path can be pasted straight into a shell. Where a path differs between installer types or shipping flavours, each one is racked as its own card below - why that happens.

Finding your way around Windows and Linux.

LNX

PostgreSQL - Linux

PostgreSQL Global Development Group
Ubuntu/Debian/var/log/postgresql/postgresql-<version>-main.log
RHEL/CentOS/var/lib/pgsql/<version>/data/log/