Re: Repmgr 4, 2 primary servers in cluster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Kurt,

When you promote a standby node to become primary, you cannot just reconnect the old primary to become a new standby. Both are now separated servers. Both are primary nodes.

In the context of repmgr, to reuse the old server as a new standby, you will have to first unregister the old primary with:

repmgr primary unregister --node-id <theid>

More info here: https://repmgr.org/docs/4.1/repmgr-primary-unregister.html

Once it's unregistered you have two choices:

- Either you rebuild a new standby instance on the same server with 'repmgr standby clone'

- or more complex, but useful for large databases, you manually synchronize the existing instance with rsync (while doing a base backup), and create the correct 'recovery.conf' file. Then 'repmgr standby register' with the correct information.

Now, if you are interested in a planned switchover, repmgr also has a command for that:

https://repmgr.org/docs/4.1/performing-switchover.html

I hope that helps

Cheers
Boriss

Van Gompel Kurt wrote on 2018-09-19 20:22:
Hello,

I'm testing Postgresql 10 with repmgr 4.

I set up a primary with 1 standby server.

Afterwards, I stopped the primary server and promoted the standby server to primary (repmgr standby promote -f /etc/repmgr.conf).

Now the command 'repmgr -f /etc/repmgr.conf cluster show' shows 2 primary servers.

How can I turn the 'old primary' server into a standby?

Thanks in advance for your answers?

*__________________
**Kurt VAN GOMPEL*
Database Administration

/Infrastructure/
Tel :*+32 (2) 504.66.13*
Fax :*+32 (2) 219.34.61*
Troonstraat 30A 1000 Brussel
*www.hziv.be**
**__________________
*De HZIV, een andere mutualiteit!


--------------------------------------------------------------------------------
Deze e-mail en alle bijlagen zijn vertrouwelijk. Als deze e-mail niet voor u bestemd is, vragen wij u dat ons te melden en deze e-mail inclusief alle bijlagen te verwijderen. Deze e-mail verbindt de HZIV enkel indien hij afkomstig is van een natuurlijke persoon die krachtens de wettelijke en/of reglementaire bepalingen werd aangesteld om de HZIV te vertegenwoordigen en handelt binnen de perken van zijn bevoegdheid.
________________________________

Ce courriel et toutes ses annexes sont confidentiels. Si ce courriel ne vous est pas destiné, nous vous prions de nous en informer et de le supprimer ainsi que ses annexes. Ce courriel lie uniquement la CAAMI s'il émane d'une personne physique qui en vertu des dispositions légales et/ou réglementaires, a été désignée pour représenter la CAAMI et qui agit dans les limites de sa compétence.
________________________________

Diese E-Mail und alle Anlagen sind vertraulich. Falls diese E-Mail nicht für Sie bestimmt ist, möchten wir Sie bitten uns darüber zu informieren und diese E-Mail einschlieβend alle Anlagen zu vernichten. Diese E-Mail verbindet nur die HKIV, indem sie von einer natürlichen Person stammt, die kraft der gesetzlichen und/oder vorschriftsmäβigen Bestimmungen angestellt wurde, um die HKIV zu vertreten und im Rahmen ihrer Zuständigkeit handelt.




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux