From b2ab1e6bc9a61a2e5add59da298ec755ba75ab5c Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 26 Sep 2002 22:58:34 +0000 Subject: Ensure that before truncating CLOG, we force a checkpoint even if no recent WAL activity has occurred. Without this, it's possible that a later crash might leave tuples on disk with un-updated commit status bits. --- src/backend/access/transam/clog.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/backend/access/transam/clog.c') diff --git a/src/backend/access/transam/clog.c b/src/backend/access/transam/clog.c index 4b935492ea5..b72fb5d651e 100644 --- a/src/backend/access/transam/clog.c +++ b/src/backend/access/transam/clog.c @@ -13,7 +13,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Header: /cvsroot/pgsql/src/backend/access/transam/clog.c,v 1.10 2002/09/02 02:47:01 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/transam/clog.c,v 1.11 2002/09/26 22:58:33 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -809,8 +809,8 @@ TruncateCLOG(TransactionId oldestXact) if (!ScanCLOGDirectory(cutoffPage, false)) return; /* nothing to remove */ - /* Perform a CHECKPOINT */ - CreateCheckPoint(false); + /* Perform a forced CHECKPOINT */ + CreateCheckPoint(false, true); /* * Scan CLOG shared memory and remove any pages preceding the cutoff -- cgit v1.2.3