mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-27 08:56:29 +00:00
standby promote: in Pg13 and later, promotion overrides paused WAL replay
Aborting in this case no longer makes sense, so we apply the checks to PostgreSQL 12 and earlier only.
This commit is contained in:
@@ -2333,14 +2333,15 @@ do_standby_promote(void)
|
||||
}
|
||||
|
||||
/*
|
||||
* Executing "pg_ctl ... promote" when WAL replay is paused and
|
||||
* WAL is pending replay will mean the standby will not promote
|
||||
* until replay is resumed.
|
||||
* In PostgreSQL 12 and earlier, executing "pg_ctl ... promote" when WAL
|
||||
* replay is paused and WAL is pending replay will mean the standby will
|
||||
* not promote until replay is resumed.
|
||||
*
|
||||
* As that could happen at any time outside repmgr's control, we
|
||||
* need to avoid leaving a "ticking timebomb" which might cause
|
||||
* an unexpected status change in the replication cluster.
|
||||
*/
|
||||
if (PQserverVersion(local_conn) < 130000)
|
||||
{
|
||||
ReplInfo replication_info;
|
||||
bool replay_paused = false;
|
||||
|
||||
Reference in New Issue
Block a user