Promoting Hot standby after running select pg_xlog_replay_pause();

From: "Bellrose, Brian" <brian(dot)bellrose(at)Wabtec(dot)com>
To: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Promoting Hot standby after running select pg_xlog_replay_pause();
Date: 2020-03-27 20:10:22
Message-ID: BN7PR07MB4178842E599C388A7A3C41DDE7CC0@BN7PR07MB4178.namprd07.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a scenario where we are doing an application release and they want to be able to potentially rollback to HA if things go bad. So the current process would be:

1. Run select pg_xlog_replay_pause(); on standby to pause replication
2. Apply changes
3. If team needs to revert to older version of cluster we would run pg_ctl promote

My question is, would pg_ctl prmote start up from the point where replication was paused or would it try and sync before it opens? Thus applying all the changes I am trying to prevent?

Thanks,
Brian

This email and any attachments are only for use by the intended recipient(s) and may contain legally privileged, confidential, proprietary or otherwise private information. Any unauthorized use, reproduction, dissemination, distribution or other disclosure of the contents of this e-mail or its attachments is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original. Neither this information block, the typed name of the sender, nor anything else in this message is intended to constitute an electronic signature unless a specific statement to the contrary is included in this message.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Munro 2020-03-27 20:40:30 Re: \COPY to accept non UTF-8 chars in CHAR columns
Previous Message Julien Rouhaud 2020-03-27 19:23:03 Re: PG12 autovac issues