Where are PostgreSQL logs stored?

Better Stack Team
Updated on November 23, 2022

PostgreSQL stores logs in the log files. Depending on your system, you can find the logs at the following locations:


On Ubuntu and Ubuntu-like systems, the PostgreSQL log is stored in the /var/log/postgresql directory.

OSX Homebrew

On latest OSX Homebrew, logs are stored at /opt/homebrew/var/log/postgres.log

Got an article suggestion? Let us know
Explore more
Licensed under CC-BY-NC-SA

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

We are hiring.

Software is our way of making the world a tiny bit better. We build tools for the makers of tomorrow.

Explore all positions →

Reliability is the
ultimate feature

Delightful observability tools that turn your logs & monitoring into a secret weapon for shipping better software faster.

Explore Better Stack