diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-09-26 22:58:34 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-09-26 22:58:34 +0000 |
commit | b2ab1e6bc9a61a2e5add59da298ec755ba75ab5c (patch) | |
tree | bb3be2527c94154e02a290655b9584d00a940879 /src/backend/access/transam/clog.c | |
parent | c87469e64a9b893b72254a1850c366fb04777430 (diff) | |
download | postgresql-b2ab1e6bc9a61a2e5add59da298ec755ba75ab5c.tar.gz postgresql-b2ab1e6bc9a61a2e5add59da298ec755ba75ab5c.zip |
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.
Diffstat (limited to 'src/backend/access/transam/clog.c')
-rw-r--r-- | src/backend/access/transam/clog.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 |