From 16974ee9103ef7908e81869687b3fc3719e64a4e Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 27 May 2004 17:12:57 +0000 Subject: Get rid of the former rather baroque mechanism for propagating the values of ThisStartUpID and RedoRecPtr into new backends. It's a lot easier just to make them all grab the values out of shared memory during startup. This helps to decouple the postmaster from checkpoint execution, which I need since I'm intending to let the bgwriter do it instead, and it also fixes a bug in the Win32 port: ThisStartUpID wasn't getting propagated at all AFAICS. (Doesn't give me a lot of faith in the amount of testing that port has gotten.) --- src/backend/bootstrap/bootstrap.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/backend/bootstrap/bootstrap.c') diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c index 3aca65e845c..315c17e526a 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.179 2004/05/21 05:07:56 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.180 2004/05/27 17:12:49 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -489,12 +489,12 @@ BootstrapMain(int argc, char *argv[]) break; case BS_XLOG_CHECKPOINT: + InitXLOGAccess(); CreateCheckPoint(false, false); - SetSavedRedoRecPtr(); /* pass redo ptr back to - * postmaster */ proc_exit(0); /* done */ case BS_XLOG_BGWRITER: + InitXLOGAccess(); BufferBackgroundWriter(); proc_exit(0); /* done */ @@ -504,6 +504,7 @@ BootstrapMain(int argc, char *argv[]) proc_exit(0); /* done */ case BS_XLOG_SHUTDOWN: + InitXLOGAccess(); ShutdownXLOG(0, 0); DumpFreeSpaceMap(0, 0); proc_exit(0); /* done */ -- cgit v1.2.3