Fix for SIGTERM - Mailing list pgsql-patches

From Bruce Momjian
Subject Fix for SIGTERM
Date
Msg-id 200404161258.i3GCwK500322@candle.pha.pa.us
Whole thread Raw
List pgsql-patches
This patch fixes a server crash for an invalid database name.  I wasn't
dealing with Warn_restart_ready properly in my SIGTERM safety patch.

Applied.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: src/backend/utils/error/elog.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/backend/utils/error/elog.c,v
retrieving revision 1.133
diff -c -c -r1.133 elog.c
*** src/backend/utils/error/elog.c    11 Apr 2004 00:54:45 -0000    1.133
--- src/backend/utils/error/elog.c    16 Apr 2004 12:55:49 -0000
***************
*** 448,453 ****
--- 448,457 ----
              if (in_fatal_exit)
                  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 */
              in_fatal_exit = true;
          }

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Plan for CSV handling of quotes, NULL
Next
From: Andrew Dunstan
Date:
Subject: Re: Plan for CSV handling of quotes, NULL