From e26b0abda3919448d5ccbcaac0415010022864b7 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 19 Jun 2005 20:00:39 +0000 Subject: Arrange to fsync two-phase-commit state files only during checkpoints; given reasonably short lifespans for prepared transactions, this should mean that only a small minority of state files ever need to be fsynced at all. Per discussion with Heikki Linnakangas. --- src/backend/access/transam/xlog.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/backend/access/transam/xlog.c') diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 15b82ee9be..b15949b285 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -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.201 2005/06/17 22:32:43 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.202 2005/06/19 20:00:38 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -5110,6 +5110,8 @@ CreateCheckPoint(bool shutdown, bool force) CheckPointSUBTRANS(); CheckPointMultiXact(); FlushBufferPool(); + /* We deliberately delay 2PC checkpointing as long as possible */ + CheckPointTwoPhase(checkPoint.redo); START_CRIT_SECTION(); -- cgit v1.2.1