February 2020
Intermediate to advanced
734 pages
38h 13m
English
Though we used systemd to manage PostgreSQL, the resource-agents repository package installed with Pacemaker contains a resource agent specifically designed for PostgreSQL. However, its usage is far more complicated. It can also monitor PostgreSQL by querying it instead of simply using a process ID test. If you want to use this agent instead, follow these steps as root:
export CTL=$(pg_config --bindir)/pg_ctl
crm configure primitive pg_agent ocf:heartbeat:pgsql \
params pgctl="$CTL" \
pgdata="/db/pgdata" \
op monitor interval="30" timeout="60" \
op start interval="0" timeout="60" \
op stop interval="0" timeout="60" ...Read now
Unlock full access