From 867e2c91a0c341111b7a5257dc4c9a2659a022dc Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 28 Jun 2007 00:02:40 +0000 Subject: Implement "distributed" checkpoints in which the checkpoint I/O is spread over a fairly long period of time, rather than being spat out in a burst. This happens only for background checkpoints carried out by the bgwriter; other cases, such as a shutdown checkpoint, are still done at full speed. Remove the "all buffers" scan in the bgwriter, and associated stats infrastructure, since this seems no longer very useful when the checkpoint itself is properly throttled. Original patch by Itagaki Takahiro, reworked by Heikki Linnakangas, and some minor API editorialization by me. --- src/backend/bootstrap/bootstrap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/bootstrap/bootstrap.c') diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c index 0074f707382..78eb6797db4 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.233 2007/03/07 13:35:02 alvherre Exp $ + * $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.234 2007/06/28 00:02:37 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -489,7 +489,7 @@ BootstrapModeMain(void) /* Perform a checkpoint to ensure everything's down to disk */ SetProcessingMode(NormalProcessing); - CreateCheckPoint(true, true); + CreateCheckPoint(CHECKPOINT_IS_SHUTDOWN | CHECKPOINT_IMMEDIATE); /* Clean up and exit */ cleanup(); -- cgit v1.2.3