| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| #ifndef GIST_XLOG_H |
| #define GIST_XLOG_H |
|
|
| #include "access/gist.h" |
| #include "access/xlogreader.h" |
| #include "lib/stringinfo.h" |
|
|
| #define XLOG_GIST_PAGE_UPDATE 0x00 |
| #define XLOG_GIST_DELETE 0x10 |
| |
| #define XLOG_GIST_PAGE_REUSE 0x20 |
| |
| #define XLOG_GIST_PAGE_SPLIT 0x30 |
| |
| |
| #define XLOG_GIST_PAGE_DELETE 0x60 |
| #define XLOG_GIST_ASSIGN_LSN 0x70 |
|
|
| |
| |
| |
| |
| |
| typedef struct gistxlogPageUpdate |
| { |
| |
| uint16 ntodelete; |
| uint16 ntoinsert; |
|
|
| |
| |
| |
| } gistxlogPageUpdate; |
|
|
| |
| |
| |
| typedef struct gistxlogDelete |
| { |
| TransactionId snapshotConflictHorizon; |
| uint16 ntodelete; |
| bool isCatalogRel; |
| |
|
|
| |
| OffsetNumber offsets[FLEXIBLE_ARRAY_MEMBER]; |
| } gistxlogDelete; |
|
|
| #define SizeOfGistxlogDelete offsetof(gistxlogDelete, offsets) |
|
|
| |
| |
| |
| |
| |
| typedef struct gistxlogPageSplit |
| { |
| BlockNumber origrlink; |
| GistNSN orignsn; |
| bool origleaf; |
|
|
| uint16 npage; |
| bool markfollowright; |
|
|
| |
| |
| |
| } gistxlogPageSplit; |
|
|
| |
| |
| |
| |
| typedef struct gistxlogPageDelete |
| { |
| FullTransactionId deleteXid; |
| OffsetNumber downlinkOffset; |
| |
| } gistxlogPageDelete; |
|
|
| #define SizeOfGistxlogPageDelete (offsetof(gistxlogPageDelete, downlinkOffset) + sizeof(OffsetNumber)) |
|
|
|
|
| |
| |
| |
| typedef struct gistxlogPageReuse |
| { |
| RelFileLocator locator; |
| BlockNumber block; |
| FullTransactionId snapshotConflictHorizon; |
| bool isCatalogRel; |
| |
| } gistxlogPageReuse; |
|
|
| #define SizeOfGistxlogPageReuse (offsetof(gistxlogPageReuse, isCatalogRel) + sizeof(bool)) |
|
|
| extern void gist_redo(XLogReaderState *record); |
| extern void gist_desc(StringInfo buf, XLogReaderState *record); |
| extern const char *gist_identify(uint8 info); |
| extern void gist_xlog_startup(void); |
| extern void gist_xlog_cleanup(void); |
| extern void gist_mask(char *pagedata, BlockNumber blkno); |
|
|
| #endif |
|
|