1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-11 20:28:21 +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

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.293 2002/09/20 03:45:08 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.294 2002/09/25 20:31:40 tgl Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
@ -1163,6 +1163,13 @@ PostgresMain(int argc, char *argv[], const char *username)
}
}
/*
* initialize globals (already done if under postmaster, but not if
* standalone; cheap enough to do over)
*/
MyProcPid = getpid();
/*
* Fire up essential subsystems: error and memory management
*
@ -1691,7 +1698,7 @@ PostgresMain(int argc, char *argv[], const char *username)
if (!IsUnderPostmaster)
{
puts("\nPOSTGRES backend interactive interface ");
puts("$Revision: 1.293 $ $Date: 2002/09/20 03:45:08 $\n");
puts("$Revision: 1.294 $ $Date: 2002/09/25 20:31:40 $\n");
}
/*