diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/access/heapam_xlog.h | 19 | ||||
-rw-r--r-- | src/include/access/xlog.h | 1 |
2 files changed, 19 insertions, 1 deletions
diff --git a/src/include/access/heapam_xlog.h b/src/include/access/heapam_xlog.h index 194635952cb..d6bc8f7f24f 100644 --- a/src/include/access/heapam_xlog.h +++ b/src/include/access/heapam_xlog.h @@ -67,6 +67,8 @@ #define XLOG_HEAP_CONTAINS_OLD_TUPLE (1<<2) #define XLOG_HEAP_CONTAINS_OLD_KEY (1<<3) #define XLOG_HEAP_CONTAINS_NEW_TUPLE (1<<4) +#define XLOG_HEAP_PREFIX_FROM_OLD (1<<5) +#define XLOG_HEAP_SUFFIX_FROM_OLD (1<<6) /* convenience macro for checking whether any form of old tuple was logged */ #define XLOG_HEAP_CONTAINS_OLD \ @@ -179,7 +181,22 @@ typedef struct xl_heap_update ItemPointerData newtid; /* new inserted tuple id */ uint8 old_infobits_set; /* infomask bits to set on old tuple */ uint8 flags; - /* NEW TUPLE xl_heap_header AND TUPLE DATA FOLLOWS AT END OF STRUCT */ + + /* + * If XLOG_HEAP_PREFIX_FROM_OLD or XLOG_HEAP_SUFFIX_FROM_OLD flags are + * set, the prefix and/or suffix come next, as one or two uint16s. + * + * After that, xl_heap_header_len and new tuple data follow. The new + * tuple data and length don't include the prefix and suffix, which are + * copied from the old tuple on replay. The new tuple data is omitted if + * a full-page image of the page was taken (unless the + * XLOG_HEAP_CONTAINS_NEW_TUPLE flag is set, in which case it's included + * anyway). + * + * If XLOG_HEAP_CONTAINS_OLD_TUPLE or XLOG_HEAP_CONTAINS_OLD_KEY flags are + * set, another xl_heap_header_len struct and tuple data for the old tuple + * follows. + */ } xl_heap_update; #define SizeOfHeapUpdate (offsetof(xl_heap_update, flags) + sizeof(uint8)) diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h index a238292b76e..35092284664 100644 --- a/src/include/access/xlog.h +++ b/src/include/access/xlog.h @@ -279,6 +279,7 @@ typedef struct CheckpointStatsData extern CheckpointStatsData CheckpointStats; extern XLogRecPtr XLogInsert(RmgrId rmid, uint8 info, XLogRecData *rdata); +extern bool XLogCheckBufferNeedsBackup(Buffer buffer); extern void XLogFlush(XLogRecPtr RecPtr); extern bool XLogBackgroundFlush(void); extern bool XLogNeedsFlush(XLogRecPtr RecPtr); |