2ndquadrant-it / pgbramble

PostgreSQL Educational Bramble

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pgbramble

PostgreSQL Educational Bramble

Notes

If you want use pg_ctlcluster to control the postgres service (to start/stop/restart it), it is necessary to download and install a more up to date version of postgresql-common and postgresql-client-common. The new versions fix an issue regarding systemd not recognizing when the postgres service was controlled by pg_ctlcluster.

wget http://apt.postgresql.org/pub/repos/apt/pool/main/p/pgdg-keyring/pgdg-keyring_2014.1_all.deb
wget http://apt.postgresql.org/pub/repos/apt/pool/main/p/postgresql-common/postgresql-client-common_175.pgdg80%2b1_all.deb
wget http://apt.postgresql.org/pub/repos/apt/pool/main/p/postgresql-common/postgresql-common_175.pgdg80%2b1_all.deb
dpkg -i *.deb

To avoid this and to make things easier, the handlers on this playbook use postgresql@/, eg. postgresql@9.4/main, as the service for start/restart postgres. There is a problem on the current version of Raspbian where systemd doesn't work properly when postgresql.service is used.

Therefore, using the following form is the recommended way when postgresql-common and postgresql-client-common are not updated:

systemctl status postgresql@9.4-main.service

Just as an example, the correspondent pg_ctlcluster command will be (launching as root):

pg_ctlcluster 9.4 main start

About

PostgreSQL Educational Bramble


Languages

Language:Shell 100.0%