aboutsummaryrefslogtreecommitdiff
path: root/src/backend/bootstrap/bootstrap.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-09-25 20:31:40 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-09-25 20:31:40 +0000
commit8a6fab412e35d8495201a13d8258f26b730306f5 (patch)
treeb80702276508960201ba5211b96de8c646dd76f3 /src/backend/bootstrap/bootstrap.c
parent691aefcf4294c8262a8bf89258250470be1046a6 (diff)
downloadpostgresql-8a6fab412e35d8495201a13d8258f26b730306f5.tar.gz
postgresql-8a6fab412e35d8495201a13d8258f26b730306f5.zip
Remove ShutdownBufferPoolAccess exit callback, and do the work in
ProcKill instead, where we still have a PGPROC with which to wait on LWLocks. This fixes 'can't wait without a PROC structure' failures occasionally seen during backend shutdown (I'm surprised they weren't more frequent, actually). Add an Assert() to LWLockAcquire to help catch any similar mistakes in future. Fix failure to update MyProcPid for standalone backends and pgstat processes.
Diffstat (limited to 'src/backend/bootstrap/bootstrap.c')
-rw-r--r--src/backend/bootstrap/bootstrap.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c
index b22631700b4..4df563b4285 100644
--- a/src/backend/bootstrap/bootstrap.c
+++ b/src/backend/bootstrap/bootstrap.c
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.142 2002/09/22 19:42:50 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.143 2002/09/25 20:31:40 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -369,6 +369,9 @@ BootstrapMain(int argc, char *argv[])
BaseInit();
+ if (IsUnderPostmaster)
+ InitDummyProcess(); /* needed to get LWLocks */
+
/*
* XLOG operations
*/
@@ -386,8 +389,6 @@ BootstrapMain(int argc, char *argv[])
break;
case BS_XLOG_CHECKPOINT:
- if (IsUnderPostmaster)
- InitDummyProcess(); /* needed to get LWLocks */
CreateDummyCaches();
CreateCheckPoint(false);
SetSavedRedoRecPtr(); /* pass redo ptr back to