mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
Revert "Prevent panic during shutdown checkpoint"
This reverts commit 086221cf6b, which
was made to master only.
The approach implemented in the above commit has some issues. While
those could easily be fixed incrementally, doing so would make
backpatching considerably harder, so instead first revert this patch.
Discussion: https://postgr.es/m/20170602002912.tqlwn4gymzlxpvs2@alap3.anarazel.de
This commit is contained in:
@@ -2918,7 +2918,7 @@ reaper(SIGNAL_ARGS)
|
||||
* Waken walsenders for the last time. No regular backends
|
||||
* should be around anymore.
|
||||
*/
|
||||
SignalChildren(SIGINT);
|
||||
SignalChildren(SIGUSR2);
|
||||
|
||||
pmState = PM_SHUTDOWN_2;
|
||||
|
||||
@@ -3656,9 +3656,7 @@ PostmasterStateMachine(void)
|
||||
/*
|
||||
* If we get here, we are proceeding with normal shutdown. All
|
||||
* the regular children are gone, and it's time to tell the
|
||||
* checkpointer to do a shutdown checkpoint. All WAL senders
|
||||
* are told to switch to a stopping state so that the shutdown
|
||||
* checkpoint can go ahead.
|
||||
* checkpointer to do a shutdown checkpoint.
|
||||
*/
|
||||
Assert(Shutdown > NoShutdown);
|
||||
/* Start the checkpointer if not running */
|
||||
@@ -3667,7 +3665,6 @@ PostmasterStateMachine(void)
|
||||
/* And tell it to shut down */
|
||||
if (CheckpointerPID != 0)
|
||||
{
|
||||
SignalSomeChildren(SIGUSR2, BACKEND_TYPE_WALSND);
|
||||
signal_child(CheckpointerPID, SIGUSR2);
|
||||
pmState = PM_SHUTDOWN;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user