Last active
October 17, 2016 07:58
-
-
Save yelizariev/58c3ffd357da2c166b833742ec33fc63 to your computer and use it in GitHub Desktop.
check and configure 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
# connect to docker | |
docker exec -i --user=root -t db-9.5 /bin/bash | |
# inside docker | |
psql -U odoo | |
# inside psql | |
select datname, count(*) from pg_stat_activity group by datname; | |
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
# get config from http://pgtune.leopard.in.ua/ | |
# copy current config | |
docker cp db-9.5:/var/lib/postgresql/data/postgresql.conf . | |
# backup | |
cp postgresql.conf postgresql.conf.origin | |
# edit | |
emacs postgresql.conf | |
# update | |
docker cp postgresql.conf db-9.5:/var/lib/postgresql/data/postgresql.conf | |
# restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment