mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user