PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/bufmask.h"
#include "access/heapam.h"
#include "access/visibilitymap.h"
#include "access/xlog.h"
#include "access/xlogutils.h"
#include "storage/freespace.h"
#include "storage/standby.h"
Go to the source code of this file.
Functions | |
static void | heap_xlog_prune_freeze (XLogReaderState *record) |
static void | heap_xlog_visible (XLogReaderState *record) |
static void | fix_infomask_from_infobits (uint8 infobits, uint16 *infomask, uint16 *infomask2) |
static void | heap_xlog_delete (XLogReaderState *record) |
static void | heap_xlog_insert (XLogReaderState *record) |
static void | heap_xlog_multi_insert (XLogReaderState *record) |
static void | heap_xlog_update (XLogReaderState *record, bool hot_update) |
static void | heap_xlog_confirm (XLogReaderState *record) |
static void | heap_xlog_lock (XLogReaderState *record) |
static void | heap_xlog_lock_updated (XLogReaderState *record) |
static void | heap_xlog_inplace (XLogReaderState *record) |
void | heap_redo (XLogReaderState *record) |
void | heap2_redo (XLogReaderState *record) |
void | heap_mask (char *pagedata, BlockNumber blkno) |
|
static |
Definition at line 317 of file heapam_xlog.c.
References HEAP_KEYS_UPDATED, HEAP_XMAX_EXCL_LOCK, HEAP_XMAX_IS_MULTI, HEAP_XMAX_KEYSHR_LOCK, HEAP_XMAX_LOCK_ONLY, XLHL_KEYS_UPDATED, XLHL_XMAX_EXCL_LOCK, XLHL_XMAX_IS_MULTI, XLHL_XMAX_KEYSHR_LOCK, and XLHL_XMAX_LOCK_ONLY.
Referenced by heap_xlog_delete(), heap_xlog_lock(), heap_xlog_lock_updated(), and heap_xlog_update().
void heap2_redo | ( | XLogReaderState * | record | ) |
Definition at line 1222 of file heapam_xlog.c.
References elog, heap_xlog_lock_updated(), heap_xlog_logical_rewrite(), heap_xlog_multi_insert(), heap_xlog_prune_freeze(), heap_xlog_visible(), PANIC, XLOG_HEAP2_LOCK_UPDATED, XLOG_HEAP2_MULTI_INSERT, XLOG_HEAP2_NEW_CID, XLOG_HEAP2_PRUNE_ON_ACCESS, XLOG_HEAP2_PRUNE_VACUUM_CLEANUP, XLOG_HEAP2_PRUNE_VACUUM_SCAN, XLOG_HEAP2_REWRITE, XLOG_HEAP2_VISIBLE, XLOG_HEAP_OPMASK, XLogRecGetInfo, and XLR_INFO_MASK.
void heap_mask | ( | char * | pagedata, |
BlockNumber | blkno | ||
) |
Definition at line 1261 of file heapam_xlog.c.
References HEAP_XACT_MASK, HEAP_XMAX_COMMITTED, HEAP_XMAX_INVALID, HeapTupleHeaderIsSpeculative, HeapTupleHeaderXminFrozen, ItemIdGetLength, ItemIdGetOffset, ItemIdHasStorage, ItemIdIsNormal, ItemPointerSet(), len, MASK_MARKER, mask_page_hint_bits(), mask_page_lsn_and_checksum(), mask_unused_space(), MAXALIGN, PageGetItemId(), PageGetMaxOffsetNumber(), and HeapTupleHeaderData::t_infomask.
void heap_redo | ( | XLogReaderState * | record | ) |
Definition at line 1176 of file heapam_xlog.c.
References elog, heap_xlog_confirm(), heap_xlog_delete(), heap_xlog_inplace(), heap_xlog_insert(), heap_xlog_lock(), heap_xlog_update(), PANIC, XLOG_HEAP_CONFIRM, XLOG_HEAP_DELETE, XLOG_HEAP_HOT_UPDATE, XLOG_HEAP_INPLACE, XLOG_HEAP_INSERT, XLOG_HEAP_LOCK, XLOG_HEAP_OPMASK, XLOG_HEAP_TRUNCATE, XLOG_HEAP_UPDATE, XLogRecGetInfo, and XLR_INFO_MASK.
|
static |
Definition at line 959 of file heapam_xlog.c.
References BLK_NEEDS_REDO, BufferGetBlockNumber(), BufferGetPage(), BufferIsValid(), elog, XLogReaderState::EndRecPtr, ItemIdIsNormal, ItemPointerSet(), MarkBufferDirty(), xl_heap_confirm::offnum, PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), PageSetLSN(), PANIC, HeapTupleHeaderData::t_ctid, UnlockReleaseBuffer(), XLogReadBufferForRedo(), and XLogRecGetData.
Referenced by heap_redo().
|
static |
Definition at line 341 of file heapam_xlog.c.
References BLK_NEEDS_REDO, BufferGetPage(), BufferIsValid(), CreateFakeRelcacheEntry(), elog, XLogReaderState::EndRecPtr, FirstCommandId, fix_infomask_from_infobits(), xl_heap_delete::flags, FreeFakeRelcacheEntry(), HEAP_KEYS_UPDATED, HEAP_MOVED, HEAP_XMAX_BITS, HeapTupleHeaderClearHotUpdated, HeapTupleHeaderSetCmax, HeapTupleHeaderSetMovedPartitions, HeapTupleHeaderSetXmax, HeapTupleHeaderSetXmin, xl_heap_delete::infobits_set, InvalidBuffer, InvalidTransactionId, ItemIdIsNormal, ItemPointerSetBlockNumber(), ItemPointerSetOffsetNumber(), MarkBufferDirty(), xl_heap_delete::offnum, PageClearAllVisible(), PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), PageSetLSN(), PageSetPrunable, PANIC, ReleaseBuffer(), HeapTupleHeaderData::t_ctid, HeapTupleHeaderData::t_infomask, HeapTupleHeaderData::t_infomask2, UnlockReleaseBuffer(), visibilitymap_clear(), visibilitymap_pin(), VISIBILITYMAP_VALID_BITS, XLH_DELETE_ALL_VISIBLE_CLEARED, XLH_DELETE_IS_PARTITION_MOVE, XLH_DELETE_IS_SUPER, XLogReadBufferForRedo(), XLogRecGetBlockTag(), XLogRecGetData, XLogRecGetXid, and xl_heap_delete::xmax.
Referenced by heap_redo().
|
static |
Definition at line 1135 of file heapam_xlog.c.
References BLK_NEEDS_REDO, BufferGetPage(), BufferIsValid(), elog, XLogReaderState::EndRecPtr, ItemIdGetLength, ItemIdIsNormal, MarkBufferDirty(), xl_heap_inplace::offnum, PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), PageSetLSN(), PANIC, HeapTupleHeaderData::t_hoff, UnlockReleaseBuffer(), XLogReadBufferForRedo(), XLogRecGetBlockData(), and XLogRecGetData.
Referenced by heap_redo().
|
static |
Definition at line 417 of file heapam_xlog.c.
References generate_unaccent_rules::action, Assert, BLK_NEEDS_REDO, BufferGetPage(), BufferGetPageSize(), BufferIsValid(), CreateFakeRelcacheEntry(), data, elog, XLogReaderState::EndRecPtr, FirstCommandId, xl_heap_insert::flags, FreeFakeRelcacheEntry(), HeapTupleHeaderSetCmin, HeapTupleHeaderSetXmin, InvalidBuffer, InvalidOffsetNumber, ItemPointerSetBlockNumber(), ItemPointerSetOffsetNumber(), MarkBufferDirty(), MaxHeapTupleSize, MemSet, xl_heap_insert::offnum, PageAddItem, PageClearAllVisible(), PageGetHeapFreeSpace(), PageGetMaxOffsetNumber(), PageInit(), PageSetAllVisible(), PageSetLSN(), PANIC, ReleaseBuffer(), SizeOfHeapHeader, SizeofHeapTupleHeader, UnlockReleaseBuffer(), visibilitymap_clear(), visibilitymap_pin(), VISIBILITYMAP_VALID_BITS, XLH_INSERT_ALL_FROZEN_SET, XLH_INSERT_ALL_VISIBLE_CLEARED, XLOG_HEAP_INIT_PAGE, XLogInitBufferForRedo(), XLogReadBufferForRedo(), XLogRecGetBlockData(), XLogRecGetBlockTag(), XLogRecGetData, XLogRecGetInfo, XLogRecGetXid, and XLogRecordPageWithFreeSpace().
Referenced by heap_redo().
|
static |
Definition at line 998 of file heapam_xlog.c.
References BLK_NEEDS_REDO, BufferGetBlockNumber(), BufferGetPage(), BufferIsValid(), CreateFakeRelcacheEntry(), elog, XLogReaderState::EndRecPtr, FirstCommandId, fix_infomask_from_infobits(), xl_heap_lock::flags, FreeFakeRelcacheEntry(), HEAP_KEYS_UPDATED, HEAP_MOVED, HEAP_XMAX_BITS, HEAP_XMAX_IS_LOCKED_ONLY, HeapTupleHeaderClearHotUpdated, HeapTupleHeaderSetCmax, HeapTupleHeaderSetXmax, xl_heap_lock::infobits_set, InvalidBuffer, ItemIdIsNormal, ItemPointerSet(), MarkBufferDirty(), xl_heap_lock::offnum, PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), PageSetLSN(), PANIC, ReleaseBuffer(), HeapTupleHeaderData::t_ctid, HeapTupleHeaderData::t_infomask, HeapTupleHeaderData::t_infomask2, UnlockReleaseBuffer(), VISIBILITYMAP_ALL_FROZEN, visibilitymap_clear(), visibilitymap_pin(), XLH_LOCK_ALL_FROZEN_CLEARED, XLogReadBufferForRedo(), XLogRecGetBlockTag(), XLogRecGetData, and xl_heap_lock::xmax.
Referenced by heap_redo().
|
static |
Definition at line 1072 of file heapam_xlog.c.
References BLK_NEEDS_REDO, BufferGetPage(), BufferIsValid(), CreateFakeRelcacheEntry(), elog, XLogReaderState::EndRecPtr, fix_infomask_from_infobits(), xl_heap_lock_updated::flags, FreeFakeRelcacheEntry(), HEAP_KEYS_UPDATED, HEAP_MOVED, HEAP_XMAX_BITS, HeapTupleHeaderSetXmax, xl_heap_lock_updated::infobits_set, InvalidBuffer, ItemIdIsNormal, MarkBufferDirty(), xl_heap_lock_updated::offnum, PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), PageSetLSN(), PANIC, ReleaseBuffer(), HeapTupleHeaderData::t_infomask, HeapTupleHeaderData::t_infomask2, UnlockReleaseBuffer(), VISIBILITYMAP_ALL_FROZEN, visibilitymap_clear(), visibilitymap_pin(), XLH_LOCK_ALL_FROZEN_CLEARED, XLogReadBufferForRedo(), XLogRecGetBlockTag(), XLogRecGetData, and xl_heap_lock_updated::xmax.
Referenced by heap2_redo().
|
static |
Definition at line 537 of file heapam_xlog.c.
References generate_unaccent_rules::action, Assert, BLK_NEEDS_REDO, BufferGetPage(), BufferGetPageSize(), BufferIsValid(), CreateFakeRelcacheEntry(), data, xl_multi_insert_tuple::datalen, elog, XLogReaderState::EndRecPtr, FirstCommandId, FirstOffsetNumber, xl_heap_multi_insert::flags, FreeFakeRelcacheEntry(), HeapTupleHeaderSetCmin, HeapTupleHeaderSetXmin, i, InvalidBuffer, InvalidOffsetNumber, ItemPointerSetBlockNumber(), ItemPointerSetOffsetNumber(), len, MarkBufferDirty(), MaxHeapTupleSize, MemSet, xl_heap_multi_insert::ntuples, xl_heap_multi_insert::offsets, PageAddItem, PageClearAllVisible(), PageGetHeapFreeSpace(), PageGetMaxOffsetNumber(), PageInit(), PageSetAllVisible(), PageSetLSN(), PANIC, ReleaseBuffer(), SHORTALIGN, SizeofHeapTupleHeader, SizeOfMultiInsertTuple, xl_multi_insert_tuple::t_hoff, xl_multi_insert_tuple::t_infomask, xl_multi_insert_tuple::t_infomask2, UnlockReleaseBuffer(), visibilitymap_clear(), visibilitymap_pin(), VISIBILITYMAP_VALID_BITS, XLH_INSERT_ALL_FROZEN_SET, XLH_INSERT_ALL_VISIBLE_CLEARED, XLOG_HEAP_INIT_PAGE, XLogInitBufferForRedo(), XLogReadBufferForRedo(), XLogRecGetBlockData(), XLogRecGetBlockTag(), XLogRecGetData, XLogRecGetInfo, XLogRecGetXid, and XLogRecordPageWithFreeSpace().
Referenced by heap2_redo().
|
static |
Definition at line 30 of file heapam_xlog.c.
References generate_unaccent_rules::action, Assert, BLK_NEEDS_REDO, BufferGetPage(), BufferIsValid(), XLogReaderState::EndRecPtr, xl_heap_prune::flags, HeapTupleFreeze::frzflags, xlhp_freeze_plan::frzflags, heap_execute_freeze_tuple(), heap_page_prune_execute(), heap_xlog_deserialize_prune_and_freeze(), i, InHotStandby, InvalidOffsetNumber, MarkBufferDirty(), xlhp_freeze_plan::ntuples, HeapTupleFreeze::offset, PageGetHeapFreeSpace(), PageGetItem(), PageGetItemId(), PageSetLSN(), RBM_NORMAL, ResolveRecoveryConflictWithSnapshot(), SizeOfHeapPrune, HeapTupleFreeze::t_infomask, xlhp_freeze_plan::t_infomask, HeapTupleFreeze::t_infomask2, xlhp_freeze_plan::t_infomask2, UnlockReleaseBuffer(), XLHP_CLEANUP_LOCK, XLHP_HAS_CONFLICT_HORIZON, XLHP_HAS_DEAD_ITEMS, XLHP_HAS_NOW_UNUSED_ITEMS, XLHP_HAS_REDIRECTIONS, XLHP_IS_CATALOG_REL, XLogReadBufferForRedoExtended(), XLogRecGetBlockData(), XLogRecGetBlockTag(), XLogRecGetData, XLogRecordPageWithFreeSpace(), HeapTupleFreeze::xmax, and xlhp_freeze_plan::xmax.
Referenced by heap2_redo().
|
static |
Definition at line 684 of file heapam_xlog.c.
References Assert, BLK_NEEDS_REDO, BufferGetPage(), BufferGetPageSize(), BufferIsValid(), CreateFakeRelcacheEntry(), data, elog, XLogReaderState::EndRecPtr, FirstCommandId, fix_infomask_from_infobits(), xl_heap_update::flags, FreeFakeRelcacheEntry(), HEAP_KEYS_UPDATED, HEAP_MOVED, HEAP_XMAX_BITS, HeapTupleHeaderClearHotUpdated, HeapTupleHeaderSetCmax, HeapTupleHeaderSetCmin, HeapTupleHeaderSetHotUpdated, HeapTupleHeaderSetXmax, HeapTupleHeaderSetXmin, InvalidBuffer, InvalidOffsetNumber, ItemIdGetLength, ItemIdIsNormal, ItemPointerSet(), len, MarkBufferDirty(), MaxHeapTupleSize, MemSet, xl_heap_update::new_offnum, xl_heap_update::new_xmax, xl_heap_update::old_infobits_set, xl_heap_update::old_offnum, xl_heap_update::old_xmax, PageAddItem, PageClearAllVisible(), PageGetHeapFreeSpace(), PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), PageInit(), PageSetLSN(), PageSetPrunable, PANIC, ReleaseBuffer(), SizeOfHeapHeader, SizeofHeapTupleHeader, HeapTupleHeaderData::t_ctid, HeapTupleData::t_data, HeapTupleHeaderData::t_hoff, HeapTupleHeaderData::t_infomask, HeapTupleHeaderData::t_infomask2, HeapTupleData::t_len, UnlockReleaseBuffer(), visibilitymap_clear(), visibilitymap_pin(), VISIBILITYMAP_VALID_BITS, XLH_UPDATE_NEW_ALL_VISIBLE_CLEARED, XLH_UPDATE_OLD_ALL_VISIBLE_CLEARED, XLH_UPDATE_PREFIX_FROM_OLD, XLH_UPDATE_SUFFIX_FROM_OLD, XLOG_HEAP_INIT_PAGE, XLogInitBufferForRedo(), XLogReadBufferForRedo(), XLogRecGetBlockData(), XLogRecGetBlockTag(), XLogRecGetBlockTagExtended(), XLogRecGetData, XLogRecGetInfo, XLogRecGetXid, and XLogRecordPageWithFreeSpace().
Referenced by heap_redo().
|
static |
Definition at line 182 of file heapam_xlog.c.
References generate_unaccent_rules::action, Assert, BLK_NEEDS_REDO, BLK_RESTORED, BUFFER_LOCK_UNLOCK, BufferGetPage(), BufferIsValid(), CreateFakeRelcacheEntry(), XLogReaderState::EndRecPtr, xl_heap_visible::flags, FreeFakeRelcacheEntry(), InHotStandby, InvalidBuffer, LockBuffer(), MarkBufferDirty(), PageGetFreeSpace(), PageInit(), PageIsNew(), PageSetAllVisible(), PageSetLSN(), RBM_ZERO_ON_ERROR, ReleaseBuffer(), ResolveRecoveryConflictWithSnapshot(), xl_heap_visible::snapshotConflictHorizon, UnlockReleaseBuffer(), visibilitymap_pin(), visibilitymap_set(), VISIBILITYMAP_VALID_BITS, VISIBILITYMAP_XLOG_CATALOG_REL, VISIBILITYMAP_XLOG_VALID_BITS, XLogHintBitIsNeeded, XLogReadBufferForRedo(), XLogReadBufferForRedoExtended(), XLogRecGetBlockTag(), XLogRecGetData, and XLogRecordPageWithFreeSpace().
Referenced by heap2_redo().