Resync second slave to new master - Mailing list pgsql-general

From Dylan Luong
Subject Resync second slave to new master
Date
Msg-id 4acf4492b18c4c4ca42bebc8570c84a5@ITUPW-EXMBOX3B.UniNet.unisa.edu.au
Whole thread Raw
Responses Re: Resync second slave to new master  (Michael Paquier <michael@paquier.xyz>)
List pgsql-general

Hi

 

We are currently on PostgreSQL 9.6 and our HA is configured as  master/slave with wal streaming replication.

We would like to setup a second slave which replicates from the same master.

 

Eg:

Current setup:

 

Slave ß Master

Slave is setup for automatic failover and we use pg_rewind after failover to rewind the old master as new slave.

 

New setup:

 

Slave1   ß Master à Slave2

 

Slave 2 (new) is for reporting and nightly pg_dumps, as we have some very big databases.

Slave 1 is for HA and is setup automatic failover.

 

After a failover (promote) to the Slave1,  is it easily resync the Slave2 to the new master (old slave1)? Do we need to do  full rebuild of the Slave2 from new master everytime we failover to Slave1 from Master? Can we use pg_rewind on Slave2 to resyn it with new master (old slave1)?

 

Thanks

Dylan

pgsql-general by date:

Previous
From: Alvaro Aguayo Garcia-Rada
Date:
Subject: RE: org.postgresql.util.PSQLException: Error could not open file"base/": No such file or directory
Next
From: Łukasz Jarych
Date:
Subject: Re: What is wrong with my pgadmin?