Created
August 9, 2017 13:59
-
-
Save nplusp/b6ebd6998e03d9cee83e46f174faab31 to your computer and use it in GitHub Desktop.
Catch slow queries in Postgres
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
cat /etc/postgresql/9.6/main/postgresql.conf | grep log_min_duration_statement | |
#log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements | |
log_min_duration_statement = 100 | |
sudo tail -f /var/log/postgresql/postgresql-9.6-main.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment