Resync second slave to new master

From: Dylan Luong <Dylan(dot)Luong(at)unisa(dot)edu(dot)au>
To: pgsql-generallists(dot)postgresql(dot)org <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Resync second slave to new master
Date: 2018-03-06 04:45:10
Message-ID: 4acf4492b18c4c4ca42bebc8570c84a5@ITUPW-EXMBOX3B.UniNet.unisa.edu.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

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