PostgreSQL Source Code
git master
|
#include "access/transam.h"
#include "access/xlogreader.h"
#include "lib/stringinfo.h"
#include "storage/off.h"
Go to the source code of this file.
Data Structures | |
struct | xl_btree_metadata |
struct | xl_btree_insert |
struct | xl_btree_split |
struct | xl_btree_dedup |
struct | xl_btree_reuse_page |
struct | xl_btree_vacuum |
struct | xl_btree_delete |
struct | xl_btree_update |
struct | xl_btree_mark_page_halfdead |
struct | xl_btree_unlink_page |
struct | xl_btree_newroot |
Macros | |
#define | XLOG_BTREE_INSERT_LEAF 0x00 /* add index tuple without split */ |
#define | XLOG_BTREE_INSERT_UPPER 0x10 /* same, on a non-leaf page */ |
#define | XLOG_BTREE_INSERT_META 0x20 /* same, plus update metapage */ |
#define | XLOG_BTREE_SPLIT_L 0x30 /* add index tuple with split */ |
#define | XLOG_BTREE_SPLIT_R 0x40 /* as above, new item on right */ |
#define | XLOG_BTREE_INSERT_POST 0x50 /* add index tuple with posting split */ |
#define | XLOG_BTREE_DEDUP 0x60 /* deduplicate tuples for a page */ |
#define | XLOG_BTREE_DELETE 0x70 /* delete leaf index tuples for a page */ |
#define | XLOG_BTREE_UNLINK_PAGE 0x80 /* delete a half-dead page */ |
#define | XLOG_BTREE_UNLINK_PAGE_META 0x90 /* same, and update metapage */ |
#define | XLOG_BTREE_NEWROOT 0xA0 /* new root page */ |
#define | XLOG_BTREE_MARK_PAGE_HALFDEAD 0xB0 /* mark a leaf as half-dead */ |
#define | XLOG_BTREE_VACUUM |
#define | XLOG_BTREE_REUSE_PAGE |
#define | XLOG_BTREE_META_CLEANUP |
#define | SizeOfBtreeInsert (offsetof(xl_btree_insert, offnum) + sizeof(OffsetNumber)) |
#define | SizeOfBtreeSplit (offsetof(xl_btree_split, postingoff) + sizeof(uint16)) |
#define | SizeOfBtreeDedup (offsetof(xl_btree_dedup, nintervals) + sizeof(uint16)) |
#define | SizeOfBtreeReusePage (offsetof(xl_btree_reuse_page, isCatalogRel) + sizeof(bool)) |
#define | SizeOfBtreeVacuum (offsetof(xl_btree_vacuum, nupdated) + sizeof(uint16)) |
#define | SizeOfBtreeDelete (offsetof(xl_btree_delete, isCatalogRel) + sizeof(bool)) |
#define | SizeOfBtreeUpdate (offsetof(xl_btree_update, ndeletedtids) + sizeof(uint16)) |
#define | SizeOfBtreeMarkPageHalfDead (offsetof(xl_btree_mark_page_halfdead, topparent) + sizeof(BlockNumber)) |
#define | SizeOfBtreeUnlinkPage (offsetof(xl_btree_unlink_page, leaftopparent) + sizeof(BlockNumber)) |
#define | SizeOfBtreeNewroot (offsetof(xl_btree_newroot, level) + sizeof(uint32)) |
Typedefs | |
typedef struct xl_btree_metadata | xl_btree_metadata |
typedef struct xl_btree_insert | xl_btree_insert |
typedef struct xl_btree_split | xl_btree_split |
typedef struct xl_btree_dedup | xl_btree_dedup |
typedef struct xl_btree_reuse_page | xl_btree_reuse_page |
typedef struct xl_btree_vacuum | xl_btree_vacuum |
typedef struct xl_btree_delete | xl_btree_delete |
typedef struct xl_btree_update | xl_btree_update |
typedef struct xl_btree_mark_page_halfdead | xl_btree_mark_page_halfdead |
typedef struct xl_btree_unlink_page | xl_btree_unlink_page |
typedef struct xl_btree_newroot | xl_btree_newroot |
Functions | |
void | btree_redo (XLogReaderState *record) |
void | btree_xlog_startup (void) |
void | btree_xlog_cleanup (void) |
void | btree_mask (char *pagedata, BlockNumber blkno) |
void | btree_desc (StringInfo buf, XLogReaderState *record) |
const char * | btree_identify (uint8 info) |
#define SizeOfBtreeDedup (offsetof(xl_btree_dedup, nintervals) + sizeof(uint16)) |
#define SizeOfBtreeDelete (offsetof(xl_btree_delete, isCatalogRel) + sizeof(bool)) |
#define SizeOfBtreeInsert (offsetof(xl_btree_insert, offnum) + sizeof(OffsetNumber)) |
#define SizeOfBtreeMarkPageHalfDead (offsetof(xl_btree_mark_page_halfdead, topparent) + sizeof(BlockNumber)) |
#define SizeOfBtreeNewroot (offsetof(xl_btree_newroot, level) + sizeof(uint32)) |
#define SizeOfBtreeReusePage (offsetof(xl_btree_reuse_page, isCatalogRel) + sizeof(bool)) |
#define SizeOfBtreeSplit (offsetof(xl_btree_split, postingoff) + sizeof(uint16)) |
#define SizeOfBtreeUnlinkPage (offsetof(xl_btree_unlink_page, leaftopparent) + sizeof(BlockNumber)) |
#define SizeOfBtreeUpdate (offsetof(xl_btree_update, ndeletedtids) + sizeof(uint16)) |
#define SizeOfBtreeVacuum (offsetof(xl_btree_vacuum, nupdated) + sizeof(uint16)) |
#define XLOG_BTREE_INSERT_LEAF 0x00 /* add index tuple without split */ |
#define XLOG_BTREE_INSERT_META 0x20 /* same, plus update metapage */ |
#define XLOG_BTREE_INSERT_POST 0x50 /* add index tuple with posting split */ |
#define XLOG_BTREE_INSERT_UPPER 0x10 /* same, on a non-leaf page */ |
#define XLOG_BTREE_MARK_PAGE_HALFDEAD 0xB0 /* mark a leaf as half-dead */ |
#define XLOG_BTREE_META_CLEANUP |
#define XLOG_BTREE_REUSE_PAGE |
#define XLOG_BTREE_SPLIT_L 0x30 /* add index tuple with split */ |
#define XLOG_BTREE_SPLIT_R 0x40 /* as above, new item on right */ |
#define XLOG_BTREE_UNLINK_PAGE 0x80 /* delete a half-dead page */ |
#define XLOG_BTREE_UNLINK_PAGE_META 0x90 /* same, and update metapage */ |
#define XLOG_BTREE_VACUUM |
typedef struct xl_btree_dedup xl_btree_dedup |
typedef struct xl_btree_delete xl_btree_delete |
typedef struct xl_btree_insert xl_btree_insert |
typedef struct xl_btree_mark_page_halfdead xl_btree_mark_page_halfdead |
typedef struct xl_btree_metadata xl_btree_metadata |
typedef struct xl_btree_newroot xl_btree_newroot |
typedef struct xl_btree_reuse_page xl_btree_reuse_page |
typedef struct xl_btree_split xl_btree_split |
typedef struct xl_btree_unlink_page xl_btree_unlink_page |
typedef struct xl_btree_update xl_btree_update |
typedef struct xl_btree_vacuum xl_btree_vacuum |
void btree_desc | ( | StringInfo | buf, |
XLogReaderState * | record | ||
) |
Definition at line 24 of file nbtdesc.c.
References appendStringInfo(), buf, RelFileLocator::dbOid, delvacuum_desc(), EpochFromFullTransactionId, xl_btree_split::firstrightoff, xl_btree_reuse_page::isCatalogRel, xl_btree_delete::isCatalogRel, xl_btree_metadata::last_cleanup_num_delpages, xl_btree_mark_page_halfdead::leafblk, xl_btree_unlink_page::leafleftsib, xl_btree_unlink_page::leafrightsib, xl_btree_unlink_page::leaftopparent, xl_btree_mark_page_halfdead::leftblk, xl_btree_unlink_page::leftsib, xl_btree_split::level, xl_btree_unlink_page::level, xl_btree_newroot::level, xl_btree_reuse_page::locator, xl_btree_vacuum::ndeleted, xl_btree_delete::ndeleted, xl_btree_split::newitemoff, xl_btree_dedup::nintervals, xl_btree_vacuum::nupdated, xl_btree_delete::nupdated, xl_btree_insert::offnum, xl_btree_split::postingoff, RelFileLocator::relNumber, xl_btree_mark_page_halfdead::rightblk, xl_btree_unlink_page::rightsib, xl_btree_unlink_page::safexid, xl_btree_reuse_page::snapshotConflictHorizon, xl_btree_delete::snapshotConflictHorizon, RelFileLocator::spcOid, xl_btree_mark_page_halfdead::topparent, XidFromFullTransactionId, XLOG_BTREE_DEDUP, XLOG_BTREE_DELETE, XLOG_BTREE_INSERT_LEAF, XLOG_BTREE_INSERT_META, XLOG_BTREE_INSERT_POST, XLOG_BTREE_INSERT_UPPER, XLOG_BTREE_MARK_PAGE_HALFDEAD, XLOG_BTREE_META_CLEANUP, XLOG_BTREE_NEWROOT, XLOG_BTREE_REUSE_PAGE, XLOG_BTREE_SPLIT_L, XLOG_BTREE_SPLIT_R, XLOG_BTREE_UNLINK_PAGE, XLOG_BTREE_UNLINK_PAGE_META, XLOG_BTREE_VACUUM, XLogRecGetBlockData(), XLogRecGetData, XLogRecGetInfo, XLogRecHasBlockData, and XLR_INFO_MASK.
const char* btree_identify | ( | uint8 | info | ) |
Definition at line 139 of file nbtdesc.c.
References XLOG_BTREE_DEDUP, XLOG_BTREE_DELETE, XLOG_BTREE_INSERT_LEAF, XLOG_BTREE_INSERT_META, XLOG_BTREE_INSERT_POST, XLOG_BTREE_INSERT_UPPER, XLOG_BTREE_MARK_PAGE_HALFDEAD, XLOG_BTREE_META_CLEANUP, XLOG_BTREE_NEWROOT, XLOG_BTREE_REUSE_PAGE, XLOG_BTREE_SPLIT_L, XLOG_BTREE_SPLIT_R, XLOG_BTREE_UNLINK_PAGE, XLOG_BTREE_UNLINK_PAGE_META, XLOG_BTREE_VACUUM, and XLR_INFO_MASK.
void btree_mask | ( | char * | pagedata, |
BlockNumber | blkno | ||
) |
Definition at line 1091 of file nbtxlog.c.
References BTP_HAS_GARBAGE, BTP_SPLIT_END, BTPageGetOpaque, BTPageOpaqueData::btpo_cycleid, BTPageOpaqueData::btpo_flags, mask_lp_flags(), mask_page_hint_bits(), mask_page_lsn_and_checksum(), mask_unused_space(), and P_ISLEAF.
void btree_redo | ( | XLogReaderState * | record | ) |
Definition at line 1014 of file nbtxlog.c.
References _bt_restore_meta(), btree_xlog_dedup(), btree_xlog_delete(), btree_xlog_insert(), btree_xlog_mark_page_halfdead(), btree_xlog_newroot(), btree_xlog_reuse_page(), btree_xlog_split(), btree_xlog_unlink_page(), btree_xlog_vacuum(), elog, MemoryContextReset(), MemoryContextSwitchTo(), opCtx, PANIC, XLOG_BTREE_DEDUP, XLOG_BTREE_DELETE, XLOG_BTREE_INSERT_LEAF, XLOG_BTREE_INSERT_META, XLOG_BTREE_INSERT_POST, XLOG_BTREE_INSERT_UPPER, XLOG_BTREE_MARK_PAGE_HALFDEAD, XLOG_BTREE_META_CLEANUP, XLOG_BTREE_NEWROOT, XLOG_BTREE_REUSE_PAGE, XLOG_BTREE_SPLIT_L, XLOG_BTREE_SPLIT_R, XLOG_BTREE_UNLINK_PAGE, XLOG_BTREE_UNLINK_PAGE_META, XLOG_BTREE_VACUUM, XLogRecGetInfo, and XLR_INFO_MASK.
void btree_xlog_cleanup | ( | void | ) |
void btree_xlog_startup | ( | void | ) |
Definition at line 1073 of file nbtxlog.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, CurrentMemoryContext, and opCtx.