pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedRepmgr 4, 2 primary servers in cluster
4+ messages / 3 participants
[nested] [flat]
* Repmgr 4, 2 primary servers in cluster
@ 2018-09-19 18:22 Van Gompel Kurt <KVangompel@caami-hziv.fgov.be>
0 siblings, 2 replies; 4+ messages in thread
From: Van Gompel Kurt @ 2018-09-19 18:22 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>; +Cc: Van Gompel Kurt <KVangompel@caami-hziv.fgov.be>
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.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Repmgr 4, 2 primary servers in cluster
@ 2018-09-20 07:24 Shreeyansh Dba <shreeyansh2014@gmail.com>
parent: Van Gompel Kurt <KVangompel@caami-hziv.fgov.be>
1 sibling, 1 reply; 4+ messages in thread
From: Shreeyansh Dba @ 2018-09-20 07:24 UTC (permalink / raw)
To: KVangompel@caami-hziv.fgov.be; +Cc: pgsql-admin@lists.postgresql.org
Hi Van,
Go through this link. hope this will help you.
https://medium.com/@victor.boissiere/how-to-setup-postgresql-cluster-with-repmgr-febc2f10c243
<http://www.shreeyansh.com;
On Wed, Sep 19, 2018 at 11:52 PM Van Gompel Kurt <
KVangompel@caami-hziv.fgov.be> wrote:
> 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 <http://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.
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Repmgr 4, 2 primary servers in cluster
@ 2018-09-20 11:43 Boriss Mejias <bmejias@dcc.uchile.cl>
parent: Van Gompel Kurt <KVangompel@caami-hziv.fgov.be>
1 sibling, 0 replies; 4+ messages in thread
From: Boriss Mejias @ 2018-09-20 11:43 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org
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.
^ permalink raw reply [nested|flat] 4+ messages in thread
* RE: Repmgr 4, 2 primary servers in cluster
@ 2018-09-20 14:13 Van Gompel Kurt <KVangompel@caami-hziv.fgov.be>
parent: Shreeyansh Dba <shreeyansh2014@gmail.com>
0 siblings, 0 replies; 4+ messages in thread
From: Van Gompel Kurt @ 2018-09-20 14:13 UTC (permalink / raw)
To: Shreeyansh Dba <shreeyansh2014@gmail.com>; +Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Hello,
Thanks for your quick response.
I followed your document and after a new clone of the primary, the standby is in place again.
Thanks again!!
__________________
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!
From: Shreeyansh Dba [mailto:shreeyansh2014@gmail.com]
Sent: donderdag 20 september 2018 9:25
To: Van Gompel Kurt
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Repmgr 4, 2 primary servers in cluster
Hi Van,
Go through this link. hope this will help you.
https://medium.com/@victor.boissiere/how-to-setup-postgresql-cluster-with-repmgr-febc2f10c243
[https://docs.google.com/uc?export=download&id=1gGhoMTYjvHWLCZkro06CHfeV5B0i67aE&revid=0B0kMU...]<http://www.shreeyansh.com;
On Wed, Sep 19, 2018 at 11:52 PM Van Gompel Kurt <KVangompel@caami-hziv.fgov.be<mailto:KVangompel@caami-hziv.fgov.be>> wrote:
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<http://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.
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2018-09-20 14:13 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-09-19 18:22 Repmgr 4, 2 primary servers in cluster Van Gompel Kurt <KVangompel@caami-hziv.fgov.be>
2018-09-20 07:24 ` Shreeyansh Dba <shreeyansh2014@gmail.com>
2018-09-20 14:13 ` Van Gompel Kurt <KVangompel@caami-hziv.fgov.be>
2018-09-20 11:43 ` Boriss Mejias <bmejias@dcc.uchile.cl>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox