summaryrefslogtreecommitdiff
path: root/src/backend/bootstrap
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-08-08 03:12:16 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-08-08 03:12:16 +0000
commit7117cd3a77afcf76b6488bd3e1d06f3160595027 (patch)
tree0d2feadbd044021b3cc8b5a89a68a6e720bb0afb /src/backend/bootstrap
parent89439b8c4fabf8e882f55c87979512af081f370b (diff)
downloadpostgresql-7117cd3a77afcf76b6488bd3e1d06f3160595027.tar.gz
Cause ShutdownPostgres to do a normal transaction abort during backend
exit, instead of trying to take shortcuts. Introduce some additional shutdown callback routines to eliminate kluges like having ProcKill be responsible for shutting down the buffer manager. Ensure that the order of operations during shutdown is predictable and what you would expect given the module layering.
Diffstat (limited to 'src/backend/bootstrap')
-rw-r--r--src/backend/bootstrap/bootstrap.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c
index e8261c8231..6f74ceaed7 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
- * $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.205 2005/07/04 04:51:45 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.206 2005/08/08 03:11:30 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -378,9 +378,14 @@ BootstrapMain(int argc, char *argv[])
BaseInit();
- /* needed to get LWLocks */
+ /*
+ * We aren't going to do the full InitPostgres pushups, but there
+ * are a couple of things that need to get lit up even in a dummy
+ * process.
+ */
if (IsUnderPostmaster)
{
+ /* set up proc.c to get use of LWLocks */
switch (xlogop)
{
case BS_XLOG_BGWRITER:
@@ -391,6 +396,9 @@ BootstrapMain(int argc, char *argv[])
InitDummyProcess(DUMMY_PROC_DEFAULT);
break;
}
+
+ /* finish setting up bufmgr.c */
+ InitBufferPoolBackend();
}
/*