1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-25 13:17:41 +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:
Tom Lane
2002-09-25 20:31:40 +00:00
parent 691aefcf42
commit 8a6fab412e
6 changed files with 43 additions and 34 deletions

View File

@@ -16,7 +16,7 @@
*
* Copyright (c) 2001, PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.28 2002/09/05 18:26:18 petere Exp $
* $Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.29 2002/09/25 20:31:40 tgl Exp $
* ----------
*/
#include "postgres.h"
@@ -314,6 +314,8 @@ pgstat_start(void)
IsUnderPostmaster = true; /* we are a postmaster subprocess now */
MyProcPid = getpid(); /* reset MyProcPid */
/* Lose the postmaster's on-exit routines */
on_exit_reset();
@@ -1190,6 +1192,8 @@ pgstat_main(void)
*/
pqsignal(SIGCHLD, SIG_DFL);
MyProcPid = getpid(); /* reset MyProcPid */
/*
* Identify myself via ps
*/