Re: Turn off streaming replication - leaving Master running

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: Turn off streaming replication - leaving Master running
Дата
Msg-id CAMkU=1wV24EmzVOjqqV=_QeqjVzDT3qThOT9gQTihQzGS7oSkQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Turn off streaming replication - leaving Master running  (Andy Erskine <andy.erskine@jds.net.au>)
Ответы Re: Turn off streaming replication - leaving Master running  (John R Pierce <pierce@hogranch.com>)
Список pgsql-general
On Sun, Jun 28, 2015 at 11:34 PM, Andy Erskine <andy.erskine@jds.net.au> wrote:
no snapshot available .. i don't mind running basebackup once i've finished my test.

So if someone could help with the steps to turn off replication and bring secondary up as a standalone db that would be great
thanks.

If people are used to connecting the standby in order to run production queries (to spare load from the master), then make sure they know they can't do that anymore.  Configure the network to block them, change pg_hba.conf, etc.

Make sure that it is not in archive mode, or at least that it isn't archiving to the same directory as master is.

Shut it down, remove (or rename) the recovery.conf file, and start it back up again.  Instead of doing this you could use the trigger file (configured in recovery.conf) or pg_ctl promote, but I wouldn't do that.  You don't want to make it look like you have promoted it to master, when that is not what you have done.

But since you want a clone, what is the point of first setting up streaming, and then breaking it?  Just use pg_basebackup to set up a clone directly, without ever having started streaming.  It seems like you are just going to confuse yourself about what is a standby meant for fail over, and what is a clone meant for testing.  With possibly disastrous consequences.

Cheers,

Jeff

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

Предыдущее
От: Andy Erskine
Дата:
Сообщение: Re: Turn off streaming replication - leaving Master running
Следующее
От: John R Pierce
Дата:
Сообщение: Re: Turn off streaming replication - leaving Master running