Created
January 17, 2020 17:59
-
-
Save rossmcdonald/b50197fa53af5ea57760eb806c10894e to your computer and use it in GitHub Desktop.
PostgreSQL query logging
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
# enable query logging | |
sed -i "s/.*log_statement = .*/log_statement = 'all'/" /home/node/postgresql/*/main/postgresql.conf | |
supervisorctl signal sighup postgres | |
# disable query logging | |
sed -i "s/log_statement = .*/log_statement = 'none'/" /home/node/postgresql/*/main/ | |
supervisorctl signal sighup postgres |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment