mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
Separate out bgwriter code into a logically separate module, rather
than being random pieces of other files. Give bgwriter responsibility for all checkpoint activity (other than a post-recovery checkpoint); so this child process absorbs the functionality of the former transient checkpoint and shutdown subprocesses. While at it, create an actual include file for postmaster.c, which for some reason never had its own file before.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/backend/access/transam/slru.c,v 1.14 2004/05/28 05:12:42 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/access/transam/slru.c,v 1.15 2004/05/29 22:48:18 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include "access/slru.h"
|
||||
#include "postmaster/bgwriter.h"
|
||||
#include "storage/fd.h"
|
||||
#include "storage/lwlock.h"
|
||||
#include "miscadmin.h"
|
||||
@@ -795,8 +796,8 @@ SimpleLruTruncate(SlruCtl ctl, int cutoffPage)
|
||||
if (!SlruScanDirectory(ctl, cutoffPage, false))
|
||||
return; /* nothing to remove */
|
||||
|
||||
/* Perform a forced CHECKPOINT */
|
||||
CreateCheckPoint(false, true);
|
||||
/* Perform a CHECKPOINT */
|
||||
RequestCheckpoint(true);
|
||||
|
||||
/*
|
||||
* Scan shared memory and remove any pages preceding the cutoff page,
|
||||
|
||||
Reference in New Issue
Block a user