Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

Postgresql one master multiple slaves failover

$
0
0

My problem is same which asked in this topic

Streaming Replication Failover - how to point second slave at new master?

Currently I am working on Postgresql 9.5, I have one master and two slave servers, after master crashed and one of the slaves is assigned as new master, I want to change the master of other slave without full base backup.

I tried the steps written in answer, but it does not seem to work, can someone please guide me on solving this problem?

I am writing some details of my configuration, in case it helps.

standby_mode = on
primary_conninfo = 'host=10.10.10.160 port=5432 user=repuser password=*****'
restore_command = 'cp /archivedir/%f %p'
trigger_file = '/tmp/postgresql.trigger.5432'

The 10.10.10.160 is the IP address of new master server.

Also /archivedir folder seems empty in both master and slave servers, is this normal? The below settings are present in the postgresql.conf:

wal_level = hot_standby 
archive_mode = on
archive_command = 'test ! -f /archivedir/%f && cp %p /archivedir/%f'
max_wal_senders = 3
hot_standby = on

Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>