Assistance with documenting a failover / fallback process that maintains replication - Mailing list pgsql-admin

From Hall, Michael H. (GSFC-423.0)[RAYTHEON COMPANY]"
Subject Assistance with documenting a failover / fallback process that maintains replication
Date
Msg-id D0276D5F-E478-4D03-BC3D-6DDA6C3CC157@nasa.gov
Whole thread Raw
Responses Re: Assistance with documenting a failover / fallback process that maintains replication
List pgsql-admin

I’ve had the good fortune to be able to quickly use the PG14 replication to promote my secondary server recently.

 

Before my primary had a HW failure, I been not aware that I needed to have replication configured on the primary (to obtain data when the secondary was promoted).

 

I’m hoping that someone who’s more familiar with process could review items below to make sure that I haven’t missed something.

 

Returning operations to Primary Server

Following is an "order of operations":

  1. Confirm that replication running on both servers.
  2. Have Ops stop application.
  3. Stop Postgres on db02 (temporary primary DB server).
  4. Promote db01 to primary server using "pg_ctl -D $PGDATA promote" command
  5. Edit PostgreSQL.conf file on db02.    Change parameter "hot_standby = on".
  6. Create a file "standby.signal" in $PGDATA directory on db02.  
  7. Start Postgres on db02.
  8. Confirm that replication is running from db01 to db02 

I believe that part of my problems were caused by not doing steps 5 and 6 before step 7.

 

Also, if anyone has some procedures for re-establishing replication if it fails… it would be a great help.

 

Thanks in advance.

-- 

Michael H. “Mike” Hall, Sr.   NASA-GSFC

 

 

pgsql-admin by date:

Previous
From: Bo Guo
Date:
Subject: How to increase the max query history stored
Next
From: Tim Gerber
Date:
Subject: Re: Assistance with documenting a failover / fallback process that maintains replication