summaryrefslogtreecommitdiff
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.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/include/access/xlogdefs.h b/src/include/access/xlogdefs.h
index 65836d5bc65..0940b64ca6b 100644
--- a/src/include/access/xlogdefs.h
+++ b/src/include/access/xlogdefs.h
@@ -36,6 +36,13 @@ typedef uint64 XLogRecPtr;
#define FirstNormalUnloggedLSN ((XLogRecPtr) 1000)
/*
+ * Handy macro for printing XLogRecPtr in conventional format, e.g.,
+ *
+ * printf("%X/%X", LSN_FORMAT_ARGS(lsn));
+ */
+#define LSN_FORMAT_ARGS(lsn) (AssertVariableIsOfTypeMacro((lsn), XLogRecPtr), (uint32) ((lsn) >> 32)), ((uint32) (lsn))
+
+/*
* XLogSegNo - physical log file sequence number.
*/
typedef uint64 XLogSegNo;