How it works...

The next primitive that we add to Pacemaker will need to call the script we saved as /etc/init.d/postgresql-ha. Scripts in this location are known as Linux Standard Base scripts, and Pacemaker knows to find LSB items in the /etc/init.d directory. Thus, when we call crm with the call crm with the configure primitive parameters, we name the new primitive pg_lsb to remain consistent and use the lsb:postgresql-ha resource agent. In reality, the lsb:postgresql-ha agent is merely an alias for our script.

One of the consequences of this is that our resource agent is not fully integrated into Pacemaker and has no configurable parameters. The only things we can change are generic options (op) such as monitor intervals and start or ...

Get PostgreSQL High Availability Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.