aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/access/xlog.h18
-rw-r--r--src/include/access/xlog_internal.h6
2 files changed, 9 insertions, 15 deletions
diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h
index 1b31414060d..86ab3276caf 100644
--- a/src/include/access/xlog.h
+++ b/src/include/access/xlog.h
@@ -29,7 +29,7 @@
* backup block data
* ...
*
- * where there can be zero to three backup blocks (as signaled by xl_info flag
+ * where there can be zero to four backup blocks (as signaled by xl_info flag
* bits). XLogRecord structs always start on MAXALIGN boundaries in the WAL
* files, and we round up SizeOfXLogRecord so that the rmgr data is also
* guaranteed to begin on a MAXALIGN boundary. However, no padding is added
@@ -66,24 +66,16 @@ typedef struct XLogRecord
/*
* If we backed up any disk blocks with the XLOG record, we use flag bits in
- * xl_info to signal it. We support backup of up to 3 disk blocks per XLOG
+ * xl_info to signal it. We support backup of up to 4 disk blocks per XLOG
* record.
*/
-#define XLR_BKP_BLOCK_MASK 0x0E /* all info bits used for bkp blocks */
-#define XLR_MAX_BKP_BLOCKS 3
+#define XLR_BKP_BLOCK_MASK 0x0F /* all info bits used for bkp blocks */
+#define XLR_MAX_BKP_BLOCKS 4
#define XLR_SET_BKP_BLOCK(iblk) (0x08 >> (iblk))
#define XLR_BKP_BLOCK_1 XLR_SET_BKP_BLOCK(0) /* 0x08 */
#define XLR_BKP_BLOCK_2 XLR_SET_BKP_BLOCK(1) /* 0x04 */
#define XLR_BKP_BLOCK_3 XLR_SET_BKP_BLOCK(2) /* 0x02 */
-
-/*
- * Bit 0 of xl_info is set if the backed-up blocks could safely be removed
- * from a compressed version of XLOG (that is, they are backed up only to
- * prevent partial-page-write problems, and not to ensure consistency of PITR
- * recovery). The compression algorithm would need to extract data from the
- * blocks to create an equivalent non-full-page XLOG record.
- */
-#define XLR_BKP_REMOVABLE 0x01
+#define XLR_BKP_BLOCK_4 XLR_SET_BKP_BLOCK(3) /* 0x01 */
/* Sync methods */
#define SYNC_METHOD_FSYNC 0
diff --git a/src/include/access/xlog_internal.h b/src/include/access/xlog_internal.h
index cb438797734..3f73a6850d2 100644
--- a/src/include/access/xlog_internal.h
+++ b/src/include/access/xlog_internal.h
@@ -71,7 +71,7 @@ typedef struct XLogContRecord
/*
* Each page of XLOG file has a header like this:
*/
-#define XLOG_PAGE_MAGIC 0xD068 /* can be used as WAL version indicator */
+#define XLOG_PAGE_MAGIC 0xD069 /* can be used as WAL version indicator */
typedef struct XLogPageHeaderData
{
@@ -106,8 +106,10 @@ typedef XLogLongPageHeaderData *XLogLongPageHeader;
#define XLP_FIRST_IS_CONTRECORD 0x0001
/* This flag indicates a "long" page header */
#define XLP_LONG_HEADER 0x0002
+/* This flag indicates backup blocks starting in this page are optional */
+#define XLP_BKP_REMOVABLE 0x0004
/* All defined flag bits in xlp_info (used for validity checking of header) */
-#define XLP_ALL_FLAGS 0x0003
+#define XLP_ALL_FLAGS 0x0007
#define XLogPageHeaderSize(hdr) \
(((hdr)->xlp_info & XLP_LONG_HEADER) ? SizeOfXLogLongPHD : SizeOfXLogShortPHD)