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

What is actually happening when postgresql discovers the trigger file and promotes it self from slave to master?

$
0
0

I have a streaming replication setup between two postgres servers (master: server A, slave: server B). I'm wondering what's actually happening under the hood when I touch the trigger file and the slaves takes over as master? One of the things that I wonder, and no one seems to mention anywhere in either tutorials or documentation is, what if I restart the former slave (now master) after this is done? Won't things get messed up, because the .conf file still reflects the old slave setup (e.g. hot_standby = on)? Should I update that .conf, before I can safely restart the server?

Background: The situation I'm in, that made me wonder all of this is that I need to change the HDD's on my master. This is the way I plan to do it:

  • Failover to the slave (server B)
  • Change the HDD's on the master (server A) and reinstall it
  • Start the reinstalled server A as a slave
  • After server A has catched up with server B, change server A back into being the master, and then turn server B back into being slave again

(BTW. If you got suggestions to a better workflow please tell me)


Viewing all articles
Browse latest Browse all 17268

Trending Articles



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