Created
November 18, 2014 23:08
-
-
Save pzrq/e54ecfeb99aa1657e071 to your computer and use it in GitHub Desktop.
PostgreSQL view logged queries OSX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For OSX Yosemite 10.10 `brew install postgres` [v9.3.5.1] | |
DATA_DIR='/usr/local/var/postgres/' | |
vi ${DATA_DIR}postgresql.conf | |
# Find log_statement in vi, then uncomment and set to 'all' | |
/log_statement | |
log_statement = 'all' | |
# Save / Exit vi | |
# Remember to set log_statement = 'none' when finished with debugging | |
pg_ctl -D ${DATA_DIR} reload | |
tail -f ${DATA_DIR}server.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment