1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

Improve the checkpoint signaling mechanism so that the bgwriter can tell

the difference between checkpoints forced due to WAL segment consumption
and checkpoints forced for other reasons (such as CREATE DATABASE).  Avoid
generating 'checkpoints are occurring too frequently' messages when the
checkpoint wasn't caused by WAL segment consumption.  Per gripe from
Chris K-L.
This commit is contained in:
Tom Lane
2005-06-30 00:00:52 +00:00
parent b5f7cff84f
commit 401de9c8be
6 changed files with 45 additions and 29 deletions

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.204 2005/06/29 22:51:53 tgl Exp $
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.205 2005/06/30 00:00:50 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -1337,7 +1337,7 @@ XLogWrite(XLogwrtRqst WriteRqst)
if (XLOG_DEBUG)
elog(LOG, "time for a checkpoint, signaling bgwriter");
#endif
RequestCheckpoint(false);
RequestCheckpoint(false, true);
}
}
}
@ -5496,7 +5496,7 @@ pg_start_backup(PG_FUNCTION_ARGS)
* will have different checkpoint positions and hence different
* history file names, even if nothing happened in between.
*/
RequestCheckpoint(true);
RequestCheckpoint(true, false);
/*
* Now we need to fetch the checkpoint record location, and also its