How it works...

As with all of our changes to Pacemaker, we configure the item we're adding. For this first step, we are adding a colocation named col_pg_drbd to represent the dependency between the PGServer group and the ms_drbd_pg master/slave resource. To do this, we need three elements. They are as follows:

  • The strength of the relationship, as expressed as a score: We used inf: to represent infinity, meaning that these two items should always be associated
  • The name of the resource we are trying to colocate: We use the group name PGServer, as we want all Pacemaker resources to follow it to the same node
  • The name of a resource this entry should be colocated with, and is dependent upon: By setting this to ms_drbd_pg:Master, we are telling ...

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.