mirror of
https://github.com/postgres/postgres.git
synced 2025-07-14 08:21:07 +03:00
pg_ctl promote
Fujii Masao, reviewed by Robert Haas, Stephen Frost, and Magnus Hagander.
This commit is contained in:
@ -4284,6 +4284,14 @@ sigusr1_handler(SIGNAL_ARGS)
|
||||
WalReceiverPID = StartWalReceiver();
|
||||
}
|
||||
|
||||
if (CheckPromoteSignal() && StartupPID != 0 &&
|
||||
(pmState == PM_STARTUP || pmState == PM_RECOVERY ||
|
||||
pmState == PM_HOT_STANDBY || pmState == PM_WAIT_READONLY))
|
||||
{
|
||||
/* Tell startup process to finish recovery */
|
||||
signal_child(StartupPID, SIGUSR2);
|
||||
}
|
||||
|
||||
PG_SETMASK(&UnBlockSig);
|
||||
|
||||
errno = save_errno;
|
||||
|
Reference in New Issue
Block a user