Skip to content

Instantly share code, notes, and snippets.

@maciejkowalski
Forked from pallymore/command.sh
Last active March 1, 2017 19:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maciejkowalski/9598367 to your computer and use it in GitHub Desktop.
Save maciejkowalski/9598367 to your computer and use it in GitHub Desktop.
PostgreSQL logging
# MAC OS X
tail -f ~/Library/Application\ Support/Postgres93/var/pg_log/*
# UBUNTU
tail -f /var/lib/postgresql/9.3/main/pg_log/*
# MAC OS X
edit:
~/Library/Application Support/Postgres93/var/postgresql.conf
OR # homebrew
/usr/local/var/postgres/postgresql.conf
# UBUNTU
/etc/postgresql/9.3/main/postgresql.conf
Then:
logging_collector = on
log_directory = 'pg_log'
client_min_messages = log
log_min_messages = info
log_min_duration_statement = 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment