mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
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.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user