diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-08-01 22:45:09 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-08-01 22:45:09 +0000 |
commit | 4a78cdeb6b598940e9d9adb92deca6494628802a (patch) | |
tree | 0c8ad45eea297dcbc647705265eab8188fd4d8b1 /src/backend/access/transam/twophase.c | |
parent | c722628a430f347ff4a30419004cddc9795a3bb6 (diff) | |
download | postgresql-4a78cdeb6b598940e9d9adb92deca6494628802a.tar.gz postgresql-4a78cdeb6b598940e9d9adb92deca6494628802a.zip |
Support an optional asynchronous commit mode, in which we don't flush WAL
before reporting a transaction committed. Data consistency is still
guaranteed (unlike setting fsync = off), but a crash may lose the effects
of the last few transactions. Patch by Simon, some editorialization by Tom.
Diffstat (limited to 'src/backend/access/transam/twophase.c')
-rw-r--r-- | src/backend/access/transam/twophase.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/backend/access/transam/twophase.c b/src/backend/access/transam/twophase.c index 7fdf5a7eed3..2ae81e823d5 100644 --- a/src/backend/access/transam/twophase.c +++ b/src/backend/access/transam/twophase.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/transam/twophase.c,v 1.31 2007/05/27 03:50:39 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/access/transam/twophase.c,v 1.32 2007/08/01 22:45:07 tgl Exp $ * * NOTES * Each global transaction is associated with a global transaction @@ -1706,7 +1706,11 @@ RecordTransactionCommitPrepared(TransactionId xid, XLOG_XACT_COMMIT_PREPARED | XLOG_NO_TRAN, rdata); - /* we don't currently try to sleep before flush here ... */ + /* + * We don't currently try to sleep before flush here ... nor is there + * any support for async commit of a prepared xact (the very idea is + * probably a contradiction) + */ /* Flush XLOG to disk */ XLogFlush(recptr); |