diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-09-25 20:31:40 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-09-25 20:31:40 +0000 |
commit | 8a6fab412e35d8495201a13d8258f26b730306f5 (patch) | |
tree | b80702276508960201ba5211b96de8c646dd76f3 /src/backend/tcop/postgres.c | |
parent | 691aefcf4294c8262a8bf89258250470be1046a6 (diff) | |
download | postgresql-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/tcop/postgres.c')
-rw-r--r-- | src/backend/tcop/postgres.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 0b713f25a48..6b49bdba6c5 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.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 @@ -1164,6 +1164,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 * * If we are running under the postmaster, this is done already. @@ -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"); } /* |