Commit 3e2aef58 authored by Bruce Momjian's avatar Bruce Momjian

Handle Warn_restart_ready properly in SIGTERM safety patch.

parent 3a143367
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.133 2004/04/11 00:54:45 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.134 2004/04/16 12:59:05 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -448,6 +448,10 @@ errfinish(int dummy,...) ...@@ -448,6 +448,10 @@ errfinish(int dummy,...)
if (in_fatal_exit) if (in_fatal_exit)
ereport(PANIC, (errmsg("fatal error during fatal exit, giving up"))); ereport(PANIC, (errmsg("fatal error during fatal exit, giving up")));
/* not safe to longjump */
if (!Warn_restart_ready || proc_exit_inprogress)
proc_exit(proc_exit_inprogress || !IsUnderPostmaster);
/* We will exit the backend by simulating a client EOF */ /* We will exit the backend by simulating a client EOF */
in_fatal_exit = true; in_fatal_exit = true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment