Search Postgresql Archives

Re: Turn off streaming replication - leaving Master running

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

 



On Sun, Jun 28, 2015 at 11:34 PM, Andy Erskine <andy.erskine@xxxxxxxxxx> 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

[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