diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-05-27 17:12:57 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-05-27 17:12:57 +0000 |
commit | 16974ee9103ef7908e81869687b3fc3719e64a4e (patch) | |
tree | a48db6dabaebe0cf1d255633a683bac984139420 /src/backend/bootstrap/bootstrap.c | |
parent | bb44a7c52521bc3c5c6ee81a546ea82855690e81 (diff) | |
download | postgresql-16974ee9103ef7908e81869687b3fc3719e64a4e.tar.gz postgresql-16974ee9103ef7908e81869687b3fc3719e64a4e.zip |
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.)
Diffstat (limited to 'src/backend/bootstrap/bootstrap.c')
-rw-r--r-- | src/backend/bootstrap/bootstrap.c | 7 |
1 files changed, 4 insertions, 3 deletions
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 */ |