Created
February 23, 2019 09:24
-
-
Save sauloperez/62f923ff726a3d81862d5b97cb8cc584 to your computer and use it in GitHub Desktop.
Enable pg_stat_statements
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
# At the bottom of add /etc/postgresql/9.5/main/postgresql.conf | |
shared_preload_libraries = 'pg_stat_statements' | |
pg_stat_statements.max = 10000 | |
pg_stat_statements.track = all | |
sudo systemctl restart postgresql | |
sudo su postgres | |
psql | |
CREATE extension pg_stat_statements; | |
# You can only query pg_stat_statements as postgres user |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment