How to do it...

This recipe will assume pg1 is currently the active node, and we want to move PostgreSQL to pg2. Perform these steps on either Pacemaker node as the root user:

  1. Initiate the migration with crm:
        crm resource migrate PGServer pg2
  1. Remove the continued forced migration with this command:
        crm resource unmigrate PGServer
  1. Use crm to display the currently active node:
        crm resource status PGServer

 

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.