|
PostgreSQL Source Code git master
|
#include "access/htup.h"#include "access/xlogreader.h"#include "lib/stringinfo.h"#include "storage/buf.h"#include "storage/bufpage.h"#include "storage/relfilelocator.h"#include "storage/sinval.h"#include "utils/relcache.h"

Go to the source code of this file.
Data Structures | |
| struct | xl_heap_delete |
| struct | xl_heap_truncate |
| struct | xl_heap_header |
| struct | xl_heap_insert |
| struct | xl_heap_multi_insert |
| struct | xl_multi_insert_tuple |
| struct | xl_heap_update |
| struct | xl_heap_prune |
| struct | xlhp_freeze_plan |
| struct | xlhp_freeze_plans |
| struct | xlhp_prune_items |
| struct | xl_heap_lock |
| struct | xl_heap_lock_updated |
| struct | xl_heap_confirm |
| struct | xl_heap_inplace |
| struct | xl_heap_visible |
| struct | xl_heap_new_cid |
| struct | xl_heap_rewrite_mapping |
Functions | |
| void | HeapTupleHeaderAdvanceConflictHorizon (HeapTupleHeader tuple, TransactionId *snapshotConflictHorizon) |
| void | heap_redo (XLogReaderState *record) |
| void | heap_desc (StringInfo buf, XLogReaderState *record) |
| const char * | heap_identify (uint8 info) |
| void | heap_mask (char *pagedata, BlockNumber blkno) |
| void | heap2_redo (XLogReaderState *record) |
| void | heap2_desc (StringInfo buf, XLogReaderState *record) |
| const char * | heap2_identify (uint8 info) |
| void | heap_xlog_logical_rewrite (XLogReaderState *r) |
| XLogRecPtr | log_heap_visible (Relation rel, Buffer heap_buffer, Buffer vm_buffer, TransactionId snapshotConflictHorizon, uint8 vmflags) |
| void | heap_xlog_deserialize_prune_and_freeze (char *cursor, uint16 flags, int *nplans, xlhp_freeze_plan **plans, OffsetNumber **frz_offsets, int *nredirected, OffsetNumber **redirected, int *ndead, OffsetNumber **nowdead, int *nunused, OffsetNumber **nowunused) |
| #define MinSizeOfHeapInplace (offsetof(xl_heap_inplace, nmsgs) + sizeof(int)) |
Definition at line 444 of file heapam_xlog.h.
| #define SizeOfHeapConfirm (offsetof(xl_heap_confirm, offnum) + sizeof(OffsetNumber)) |
Definition at line 431 of file heapam_xlog.h.
| #define SizeOfHeapDelete (offsetof(xl_heap_delete, flags) + sizeof(uint8)) |
Definition at line 121 of file heapam_xlog.h.
| #define SizeOfHeapHeader (offsetof(xl_heap_header, t_hoff) + sizeof(uint8)) |
Definition at line 157 of file heapam_xlog.h.
| #define SizeOfHeapInsert (offsetof(xl_heap_insert, flags) + sizeof(uint8)) |
Definition at line 168 of file heapam_xlog.h.
| #define SizeOfHeapLock (offsetof(xl_heap_lock, flags) + sizeof(uint8)) |
Definition at line 412 of file heapam_xlog.h.
| #define SizeOfHeapLockUpdated (offsetof(xl_heap_lock_updated, flags) + sizeof(uint8)) |
Definition at line 423 of file heapam_xlog.h.
| #define SizeOfHeapMultiInsert offsetof(xl_heap_multi_insert, offsets) |
Definition at line 188 of file heapam_xlog.h.
| #define SizeOfHeapNewCid (offsetof(xl_heap_new_cid, target_tid) + sizeof(ItemPointerData)) |
Definition at line 478 of file heapam_xlog.h.
| #define SizeOfHeapPrune (offsetof(xl_heap_prune, flags) + sizeof(uint16)) |
Definition at line 295 of file heapam_xlog.h.
| #define SizeOfHeapTruncate (offsetof(xl_heap_truncate, relids)) |
Definition at line 142 of file heapam_xlog.h.
| #define SizeOfHeapUpdate (offsetof(xl_heap_update, new_offnum) + sizeof(OffsetNumber)) |
Definition at line 233 of file heapam_xlog.h.
| #define SizeOfHeapVisible (offsetof(xl_heap_visible, flags) + sizeof(uint8)) |
Definition at line 458 of file heapam_xlog.h.
| #define SizeOfMultiInsertTuple (offsetof(xl_multi_insert_tuple, t_hoff) + sizeof(uint8)) |
Definition at line 199 of file heapam_xlog.h.
| #define XLH_DELETE_ALL_VISIBLE_CLEARED (1<<0) |
Definition at line 102 of file heapam_xlog.h.
| #define XLH_DELETE_CONTAINS_OLD (XLH_DELETE_CONTAINS_OLD_TUPLE | XLH_DELETE_CONTAINS_OLD_KEY) |
Definition at line 109 of file heapam_xlog.h.
| #define XLH_DELETE_CONTAINS_OLD_KEY (1<<2) |
Definition at line 104 of file heapam_xlog.h.
| #define XLH_DELETE_CONTAINS_OLD_TUPLE (1<<1) |
Definition at line 103 of file heapam_xlog.h.
| #define XLH_DELETE_IS_PARTITION_MOVE (1<<4) |
Definition at line 106 of file heapam_xlog.h.
| #define XLH_DELETE_IS_SUPER (1<<3) |
Definition at line 105 of file heapam_xlog.h.
| #define XLH_FREEZE_XVAC 0x02 |
Definition at line 347 of file heapam_xlog.h.
| #define XLH_INSERT_ALL_FROZEN_SET (1<<5) |
Definition at line 79 of file heapam_xlog.h.
| #define XLH_INSERT_ALL_VISIBLE_CLEARED (1<<0) |
Definition at line 72 of file heapam_xlog.h.
| #define XLH_INSERT_CONTAINS_NEW_TUPLE (1<<3) |
Definition at line 75 of file heapam_xlog.h.
| #define XLH_INSERT_IS_SPECULATIVE (1<<2) |
Definition at line 74 of file heapam_xlog.h.
| #define XLH_INSERT_LAST_IN_MULTI (1<<1) |
Definition at line 73 of file heapam_xlog.h.
| #define XLH_INSERT_ON_TOAST_RELATION (1<<4) |
Definition at line 76 of file heapam_xlog.h.
| #define XLH_INVALID_XVAC 0x04 |
Definition at line 348 of file heapam_xlog.h.
| #define XLH_LOCK_ALL_FROZEN_CLEARED 0x01 |
Definition at line 401 of file heapam_xlog.h.
| #define XLH_TRUNCATE_CASCADE (1<<0) |
Definition at line 126 of file heapam_xlog.h.
| #define XLH_TRUNCATE_RESTART_SEQS (1<<1) |
Definition at line 127 of file heapam_xlog.h.
| #define XLH_UPDATE_CONTAINS_NEW_TUPLE (1<<4) |
Definition at line 90 of file heapam_xlog.h.
| #define XLH_UPDATE_CONTAINS_OLD (XLH_UPDATE_CONTAINS_OLD_TUPLE | XLH_UPDATE_CONTAINS_OLD_KEY) |
Definition at line 95 of file heapam_xlog.h.
| #define XLH_UPDATE_CONTAINS_OLD_KEY (1<<3) |
Definition at line 89 of file heapam_xlog.h.
| #define XLH_UPDATE_CONTAINS_OLD_TUPLE (1<<2) |
Definition at line 88 of file heapam_xlog.h.
| #define XLH_UPDATE_NEW_ALL_VISIBLE_CLEARED (1<<1) |
Definition at line 87 of file heapam_xlog.h.
| #define XLH_UPDATE_OLD_ALL_VISIBLE_CLEARED (1<<0) |
Definition at line 85 of file heapam_xlog.h.
| #define XLH_UPDATE_PREFIX_FROM_OLD (1<<5) |
Definition at line 91 of file heapam_xlog.h.
| #define XLH_UPDATE_SUFFIX_FROM_OLD (1<<6) |
Definition at line 92 of file heapam_xlog.h.
| #define XLHL_KEYS_UPDATED 0x10 |
Definition at line 398 of file heapam_xlog.h.
| #define XLHL_XMAX_EXCL_LOCK 0x04 |
Definition at line 396 of file heapam_xlog.h.
| #define XLHL_XMAX_IS_MULTI 0x01 |
Definition at line 394 of file heapam_xlog.h.
| #define XLHL_XMAX_KEYSHR_LOCK 0x08 |
Definition at line 397 of file heapam_xlog.h.
| #define XLHL_XMAX_LOCK_ONLY 0x02 |
Definition at line 395 of file heapam_xlog.h.
| #define XLHP_CLEANUP_LOCK (1 << 2) |
Definition at line 308 of file heapam_xlog.h.
| #define XLHP_HAS_CONFLICT_HORIZON (1 << 3) |
Definition at line 316 of file heapam_xlog.h.
| #define XLHP_HAS_DEAD_ITEMS (1 << 6) |
Definition at line 330 of file heapam_xlog.h.
| #define XLHP_HAS_FREEZE_PLANS (1 << 4) |
Definition at line 322 of file heapam_xlog.h.
| #define XLHP_HAS_NOW_UNUSED_ITEMS (1 << 7) |
Definition at line 331 of file heapam_xlog.h.
| #define XLHP_HAS_REDIRECTIONS (1 << 5) |
Definition at line 329 of file heapam_xlog.h.
| #define XLHP_IS_CATALOG_REL (1 << 1) |
Definition at line 298 of file heapam_xlog.h.
| #define XLHP_VM_ALL_FROZEN (1 << 9) |
Definition at line 340 of file heapam_xlog.h.
| #define XLHP_VM_ALL_VISIBLE (1 << 8) |
Definition at line 339 of file heapam_xlog.h.
| #define XLOG_HEAP2_LOCK_UPDATED 0x60 |
Definition at line 65 of file heapam_xlog.h.
| #define XLOG_HEAP2_MULTI_INSERT 0x50 |
Definition at line 64 of file heapam_xlog.h.
| #define XLOG_HEAP2_NEW_CID 0x70 |
Definition at line 66 of file heapam_xlog.h.
| #define XLOG_HEAP2_PRUNE_ON_ACCESS 0x10 |
Definition at line 60 of file heapam_xlog.h.
| #define XLOG_HEAP2_PRUNE_VACUUM_CLEANUP 0x30 |
Definition at line 62 of file heapam_xlog.h.
| #define XLOG_HEAP2_PRUNE_VACUUM_SCAN 0x20 |
Definition at line 61 of file heapam_xlog.h.
| #define XLOG_HEAP2_REWRITE 0x00 |
Definition at line 59 of file heapam_xlog.h.
| #define XLOG_HEAP2_VISIBLE 0x40 |
Definition at line 63 of file heapam_xlog.h.
| #define XLOG_HEAP_CONFIRM 0x50 |
Definition at line 38 of file heapam_xlog.h.
| #define XLOG_HEAP_DELETE 0x10 |
Definition at line 34 of file heapam_xlog.h.
| #define XLOG_HEAP_HOT_UPDATE 0x40 |
Definition at line 37 of file heapam_xlog.h.
| #define XLOG_HEAP_INIT_PAGE 0x80 |
Definition at line 47 of file heapam_xlog.h.
| #define XLOG_HEAP_INPLACE 0x70 |
Definition at line 40 of file heapam_xlog.h.
| #define XLOG_HEAP_INSERT 0x00 |
Definition at line 33 of file heapam_xlog.h.
| #define XLOG_HEAP_LOCK 0x60 |
Definition at line 39 of file heapam_xlog.h.
| #define XLOG_HEAP_OPMASK 0x70 |
Definition at line 42 of file heapam_xlog.h.
| #define XLOG_HEAP_TRUNCATE 0x30 |
Definition at line 36 of file heapam_xlog.h.
| #define XLOG_HEAP_UPDATE 0x20 |
Definition at line 35 of file heapam_xlog.h.
|
extern |
Definition at line 265 of file heapdesc.c.
References appendStringInfo(), appendStringInfoString(), array_desc(), buf, fb(), heap_xlog_deserialize_prune_and_freeze(), infobits_desc(), ItemPointerGetBlockNumber(), ItemPointerGetOffsetNumber(), offset_elem_desc(), plan_elem_desc(), redirect_elem_desc(), SizeOfHeapPrune, VISIBILITYMAP_ALL_FROZEN, VISIBILITYMAP_ALL_VISIBLE, XLH_INSERT_ALL_FROZEN_SET, XLHP_HAS_CONFLICT_HORIZON, XLHP_IS_CATALOG_REL, XLHP_VM_ALL_FROZEN, XLHP_VM_ALL_VISIBLE, 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_VISIBLE, XLOG_HEAP_INIT_PAGE, XLOG_HEAP_OPMASK, XLogRecGetBlockData(), XLogRecGetData, XLogRecGetInfo, and XLogRecHasBlockData.
Definition at line 449 of file heapdesc.c.
References fb(), 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_INIT_PAGE, and XLR_INFO_MASK.
|
extern |
Definition at line 1352 of file heapam_xlog.c.
References elog, fb(), 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, and XLogRecGetInfo.
|
extern |
Definition at line 185 of file heapdesc.c.
References appendStringInfo(), appendStringInfoString(), array_desc(), buf, fb(), infobits_desc(), oid_elem_desc(), standby_desc_invalidations(), truncate_flags_desc(), 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, XLogRecGetData, and XLogRecGetInfo.
Definition at line 404 of file heapdesc.c.
References fb(), XLOG_HEAP_CONFIRM, XLOG_HEAP_DELETE, XLOG_HEAP_HOT_UPDATE, XLOG_HEAP_INIT_PAGE, XLOG_HEAP_INPLACE, XLOG_HEAP_INSERT, XLOG_HEAP_LOCK, XLOG_HEAP_TRUNCATE, XLOG_HEAP_UPDATE, and XLR_INFO_MASK.
|
extern |
Definition at line 1391 of file heapam_xlog.c.
References fb(), HEAP_XACT_MASK, 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.
|
extern |
Definition at line 1306 of file heapam_xlog.c.
References elog, fb(), 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, and XLogRecGetInfo.
|
extern |
Definition at line 106 of file heapdesc.c.
References Assert, data, fb(), XLHP_HAS_DEAD_ITEMS, XLHP_HAS_FREEZE_PLANS, XLHP_HAS_NOW_UNUSED_ITEMS, and XLHP_HAS_REDIRECTIONS.
Referenced by heap2_desc(), and heap_xlog_prune_freeze().
|
extern |
Definition at line 1075 of file rewriteheap.c.
References CloseTransientFile(), data, data_sync_elevel(), ereport, errcode_for_file_access(), errmsg(), ERROR, fb(), fd(), len, LOGICAL_REWRITE_FORMAT, LSN_FORMAT_ARGS, MAXPGPATH, OpenTransientFile(), PG_BINARY, pg_fsync(), PG_LOGICAL_MAPPINGS_DIR, pg_pwrite, pgstat_report_wait_end(), pgstat_report_wait_start(), snprintf, XLogRecGetData, and XLogRecGetXid.
Referenced by heap2_redo().
|
extern |
Definition at line 8062 of file heapam.c.
References fb(), HEAP_MOVED, HeapTupleHeaderGetUpdateXid(), HeapTupleHeaderGetXmin(), HeapTupleHeaderGetXvac(), HeapTupleHeaderXminCommitted(), HeapTupleHeaderXminInvalid(), HeapTupleHeaderData::t_infomask, TransactionIdDidCommit(), TransactionIdFollows(), and TransactionIdPrecedes().
Referenced by heap_index_delete_tuples(), heap_prune_chain(), and prune_freeze_plan().
|
extern |
Definition at line 8893 of file heapam.c.
References Assert, BufferIsValid(), fb(), REGBUF_NO_IMAGE, REGBUF_STANDARD, RelationIsAccessibleInLogicalDecoding, SizeOfHeapVisible, VISIBILITYMAP_XLOG_CATALOG_REL, XLOG_HEAP2_VISIBLE, XLogBeginInsert(), XLogHintBitIsNeeded, XLogInsert(), XLogRegisterBuffer(), and XLogRegisterData().
Referenced by visibilitymap_set().