mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +03:00
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.)
This commit is contained in:
@ -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 */
|
||||
|
Reference in New Issue
Block a user