Skip to content

Instantly share code, notes, and snippets.

@yelizariev
Last active October 17, 2016 07:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yelizariev/58c3ffd357da2c166b833742ec33fc63 to your computer and use it in GitHub Desktop.
Save yelizariev/58c3ffd357da2c166b833742ec33fc63 to your computer and use it in GitHub Desktop.
check and configure postgres
# 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;
# 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