From 6162432de9fb023b710c171f196e27b910e45fa7 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 12 Jan 2001 21:54:01 +0000 Subject: Add more critical-section calls: all code sections that hold spinlocks are now critical sections, so as to ensure die() won't interrupt us while we are munging shared-memory data structures. Avoid insecure intermediate states in some code that proc_exit will call, like palloc/pfree. Rename START/END_CRIT_CODE to START/END_CRIT_SECTION, since that seems to be what people tend to call them anyway, and make them be called with () like a function call, in hopes of not confusing pg_indent. I doubt that this is sufficient to make SIGTERM safe anywhere; there's just too much code that could get invoked during proc_exit(). --- src/backend/tcop/postgres.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/backend/tcop/postgres.c') diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index a73ba4df4ab..1a0aa5d0cdf 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.199 2001/01/07 04:17:29 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.200 2001/01/12 21:53:59 tgl Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -982,7 +982,7 @@ die(SIGNAL_ARGS) /* * This is split out of die() so that it can be invoked later from - * END_CRIT_CODE. + * END_CRIT_SECTION(). */ void ForceProcDie(void) @@ -1683,7 +1683,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha if (!IsUnderPostmaster) { puts("\nPOSTGRES backend interactive interface "); - puts("$Revision: 1.199 $ $Date: 2001/01/07 04:17:29 $\n"); + puts("$Revision: 1.200 $ $Date: 2001/01/12 21:53:59 $\n"); } /* -- cgit v1.2.3