Re: [ADMIN] switching replication from standard asynch to slots

Поиск
Список
Период
Сортировка
От Vladimir Borodin
Тема Re: [ADMIN] switching replication from standard asynch to slots
Дата
Msg-id EA68DEB3-2807-4180-9B6C-3C7DF19C56EF@simply.name
обсуждение исходный текст
Ответ на [ADMIN] switching replication from standard asynch to slots  (Mike Broers <mbroers@gmail.com>)
Список pgsql-admin
Hi.

9 дек. 2016 г., в 22:48, Mike Broers <mbroers@gmail.com> написал(а):

I have a few production environments that use vanilla streaming replication.  (9.5 and 9.6)

I'm curious if I can create the replication slot on the primary host, shutdown postgres on the secondary replica, update the recovery.conf to include the primary_slot_name, and restart postgres on the replica to effectively 'switch' over to use the slot for streaming without repriming with a fresh pg_basebackup.  

Also curious if I get into a pickle because of limits in pgsql_xlog disk space if I can just shut down the replica, remove the slot information, and do whatever cleanup is required on the primary and restart the replica with the slot information removed from the recovery.conf and go back to vanilla streaming replication without repriming.

Anyone do this kind of slot/streaming switcheroo?

Yep, we have used both of described scenarios, they work. Note that in the second case you would probably need a valid restore_command in recovery.conf.


Mike




--
May the force be with you…

В списке pgsql-admin по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [GENERAL] Re: [ADMIN] Would like to below scenario is possiblefor getting page/block corruption
Следующее
От: Ram DBA
Дата:
Сообщение: [ADMIN] Frequent errors in postgresql.log