aboutsummaryrefslogtreecommitdiff
path: root/src/include/access/xlogdefs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/access/xlogdefs.h')
-rw-r--r--src/include/access/xlogdefs.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/include/access/xlogdefs.h b/src/include/access/xlogdefs.h
index 8f524df75e2..8ecc3a21b1c 100644
--- a/src/include/access/xlogdefs.h
+++ b/src/include/access/xlogdefs.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/xlogdefs.h,v 1.24 2010/01/02 16:58:01 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/access/xlogdefs.h,v 1.25 2010/01/15 09:19:06 heikki Exp $
*/
#ifndef XLOG_DEFS_H
#define XLOG_DEFS_H
@@ -57,6 +57,22 @@ typedef struct XLogRecPtr
/*
+ * Macro for advancing a record pointer by the specified number of bytes.
+ */
+#define XLByteAdvance(recptr, nbytes) \
+ do { \
+ if (recptr.xrecoff + nbytes >= XLogFileSize) \
+ { \
+ recptr.xlogid += 1; \
+ recptr.xrecoff \
+ = recptr.xrecoff + nbytes - XLogFileSize; \
+ } \
+ else \
+ recptr.xrecoff += nbytes; \
+ } while (0)
+
+
+/*
* TimeLineID (TLI) - identifies different database histories to prevent
* confusion after restoring a prior state of a database installation.
* TLI does not change in a normal stop/restart of the database (including