Search Postgresql Archives

Re: upgrade to repmgr3

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

 



Hi

On 08/04/2016 05:57 PM, Pekka Rinne wrote:
hi!

I have been using postgres 9.4 and repmgr2.0 combination and been doing
replication (hot standby). Now I'd like to start doing slot based
replication and have installed repmgr3 and exeuted the provided sql scripts
and also added use_replication_slots=1 into repmgr.conf.

The question is that what is the correct procedure to switch into using
slots (max_replication_slots) in this case as the system has been set up
already without them? Do I have to unregister and re-register all the
standbys? Hopefully re-clone could be avoided.

No reclone needed.

What I tried was that I configured max_replication_hosts=5, restarted
master, created some slots using select * from
pg_create_physical_replication_slot(<name>), configured one created slot
into recovery.conf in the slave. What I noticed was that replication seemed
to be still working after this but in repl_nodes table slot_name remained
empty. Then I did standby re-register with force and slot_name was filled
with repmgr_slot_2 value which is not the name I gave for the slot. I think
repmgr invented this name but in the pg_replication_slots table
repmgr_slot_2 does not exist. There is only the slot I created myself
(active=t). So I guess this approach is not quite right.

What if I just skip doing the re-register. Does is matter if slot_name
remains empty in repl_nodes?

This won't affect replication, however if you attempt any failover actions
using repmgr (e.g. following a new master), it will probably cause problems when
attempting to create a replication slot on the new master.

As a workaround you can manually update the slot name in the repl_nodes table
to match the one you've chosen. We'll update repmgr to better handle this
kind of situation. I don't think we've had this particular use-case before,
so I'll add some notes to the documentation on how best to handle it.


Regards

Ian Barwick

--
 Ian Barwick                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux