summaryrefslogtreecommitdiff
path: root/src/include/access/xlogdefs.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-08-01 22:45:09 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-08-01 22:45:09 +0000
commit4a78cdeb6b598940e9d9adb92deca6494628802a (patch)
tree0c8ad45eea297dcbc647705265eab8188fd4d8b1 /src/include/access/xlogdefs.h
parentc722628a430f347ff4a30419004cddc9795a3bb6 (diff)
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/include/access/xlogdefs.h')
-rw-r--r--src/include/access/xlogdefs.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/access/xlogdefs.h b/src/include/access/xlogdefs.h
index ceca7794325..843f078d656 100644
--- a/src/include/access/xlogdefs.h
+++ b/src/include/access/xlogdefs.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/xlogdefs.h,v 1.17 2007/02/14 05:00:40 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/access/xlogdefs.h,v 1.18 2007/08/01 22:45:09 tgl Exp $
*/
#ifndef XLOG_DEFS_H
#define XLOG_DEFS_H
@@ -33,6 +33,8 @@ typedef struct XLogRecPtr
uint32 xrecoff; /* byte offset of location in log file */
} XLogRecPtr;
+#define XLogRecPtrIsInvalid(r) ((r).xrecoff == 0)
+
/*
* Macros for comparing XLogRecPtrs