diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-06-19 20:00:39 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-06-19 20:00:39 +0000 |
commit | e26b0abda3919448d5ccbcaac0415010022864b7 (patch) | |
tree | 0fb99bb211501ac45d5284560786f0780cfb9974 /src/backend/access/transam/xlog.c | |
parent | ba90268e2b125cb21f74b0a4b05ce4f4797186c8 (diff) | |
download | postgresql-e26b0abda3919448d5ccbcaac0415010022864b7.tar.gz postgresql-e26b0abda3919448d5ccbcaac0415010022864b7.zip |
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.
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r-- | src/backend/access/transam/xlog.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 15b82ee9be8..b15949b2854 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(); |