mirror of
https://github.com/postgres/postgres.git
synced 2025-11-21 00:42:43 +03:00
Remove obsolete check in SIGTERM handler for the startup process.
Thanks to commit3b00fdba9f, this check in the SIGTERM handler for the startup process is now obsolete and can be removed. Instead of leaving around the dead function write_stderr_signal_safe(), I've opted to just remove it for now. This partially reverts commit97550c0711. Reviewed-by: Andres Freund, Noah Misch Discussion: https://postgr.es/m/20231121212008.GA3742740%40nathanxps13
This commit is contained in:
@@ -19,8 +19,6 @@
|
||||
*/
|
||||
#include "postgres.h"
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include "access/xlog.h"
|
||||
#include "access/xlogrecovery.h"
|
||||
#include "access/xlogutils.h"
|
||||
@@ -112,20 +110,7 @@ static void
|
||||
StartupProcShutdownHandler(SIGNAL_ARGS)
|
||||
{
|
||||
if (in_restore_command)
|
||||
{
|
||||
/*
|
||||
* If we are in a child process (e.g., forked by system() in
|
||||
* RestoreArchivedFile()), we don't want to call any exit callbacks.
|
||||
* The parent will take care of that.
|
||||
*/
|
||||
if (MyProcPid == (int) getpid())
|
||||
proc_exit(1);
|
||||
else
|
||||
{
|
||||
write_stderr_signal_safe("StartupProcShutdownHandler() called in child process\n");
|
||||
_exit(1);
|
||||
}
|
||||
}
|
||||
proc_exit(1);
|
||||
else
|
||||
shutdown_requested = true;
|
||||
WakeupRecovery();
|
||||
|
||||
Reference in New Issue
Block a user