PostgreSQL Source Code
git master
|
#include "access/xlogdefs.h"
#include "storage/block.h"
#include "storage/item.h"
#include "storage/off.h"
Go to the source code of this file.
Data Structures | |
struct | PageXLogRecPtr |
struct | PageHeaderData |
Macros | |
#define | PageXLogRecPtrSet(ptr, lsn) ((ptr).xlogid = (uint32) ((lsn) >> 32), (ptr).xrecoff = (uint32) (lsn)) |
#define | PD_HAS_FREE_LINES 0x0001 /* are there any unused line pointers? */ |
#define | PD_PAGE_FULL 0x0002 /* not enough free space for new tuple? */ |
#define | PD_ALL_VISIBLE |
#define | PD_VALID_FLAG_BITS 0x0007 /* OR of all valid pd_flags bits */ |
#define | PG_PAGE_LAYOUT_VERSION 4 |
#define | PG_DATA_CHECKSUM_VERSION 1 |
#define | SizeOfPageHeaderData (offsetof(PageHeaderData, pd_linp)) |
#define | PageSetPrunable(page, xid) |
#define | PageClearPrunable(page) (((PageHeader) (page))->pd_prune_xid = InvalidTransactionId) |
#define | PAI_OVERWRITE (1 << 0) |
#define | PAI_IS_HEAP (1 << 1) |
#define | PIV_LOG_WARNING (1 << 0) |
#define | PIV_REPORT_STAT (1 << 1) |
#define | PageAddItem(page, item, size, offsetNumber, overwrite, is_heap) |
#define | PageIsVerified(page, blkno) |
Typedefs | |
typedef Pointer | Page |
typedef uint16 | LocationIndex |
typedef struct PageHeaderData | PageHeaderData |
typedef PageHeaderData * | PageHeader |
Variables | |
PGDLLIMPORT bool | ignore_checksum_failure |
#define PageClearPrunable | ( | page | ) | (((PageHeader) (page))->pd_prune_xid = InvalidTransactionId) |
#define PageIsVerified | ( | page, | |
blkno | |||
) |
#define PageSetPrunable | ( | page, | |
xid | |||
) |
#define PD_ALL_VISIBLE |
#define PD_HAS_FREE_LINES 0x0001 /* are there any unused line pointers? */ |
#define PD_VALID_FLAG_BITS 0x0007 /* OR of all valid pd_flags bits */ |
#define SizeOfPageHeaderData (offsetof(PageHeaderData, pd_linp)) |
typedef uint16 LocationIndex |
typedef PageHeaderData* PageHeader |
typedef struct PageHeaderData PageHeaderData |
OffsetNumber PageAddItemExtended | ( | Page | page, |
Item | item, | ||
Size | size, | ||
OffsetNumber | offsetNumber, | ||
int | flags | ||
) |
Definition at line 183 of file bufpage.c.
References Assert, elog, ereport, errcode(), ERRCODE_DATA_CORRUPTED, errmsg(), FirstOffsetNumber, InvalidOffsetNumber, ItemIdHasStorage, ItemIdIsUsed, ItemIdSetNormal, lower(), MAXALIGN, MaxHeapTuplesPerPage, OffsetNumberIsValid, OffsetNumberNext, PageClearHasFreeLinePointers(), PageGetItemId(), PageGetMaxOffsetNumber(), PageHasFreeLinePointers(), PAI_IS_HEAP, PAI_OVERWRITE, PANIC, PageHeaderData::pd_lower, PageHeaderData::pd_special, PageHeaderData::pd_upper, size, SizeOfPageHeaderData, upper(), VALGRIND_CHECK_MEM_IS_DEFINED, and WARNING.
|
inlinestatic |
Definition at line 439 of file bufpage.h.
References PD_ALL_VISIBLE.
Referenced by heap_delete(), heap_force_common(), heap_insert(), heap_multi_insert(), heap_update(), heap_xlog_delete(), heap_xlog_insert(), heap_xlog_multi_insert(), heap_xlog_update(), lazy_scan_prune(), and mask_page_hint_bits().
|
inlinestatic |
Definition at line 423 of file bufpage.h.
References PD_PAGE_FULL.
Referenced by heap_page_prune_and_freeze(), and mask_page_hint_bits().
|
inlinestatic |
Definition at line 407 of file bufpage.h.
References PD_HAS_FREE_LINES.
Referenced by mask_page_hint_bits(), PageAddItemExtended(), PageRepairFragmentation(), and PageTruncateLinePointerArray().
|
inlinestatic |
Definition at line 257 of file bufpage.h.
References MAXALIGN, and SizeOfPageHeaderData.
Referenced by brin_metapage_info(), brin_metapage_init(), brin_revmap_data(), brin_xlog_revmap_extend(), brinGetStats(), brinGetTupleForHeapBlock(), brinRevmapDesummarizeRange(), brinRevmapInitialize(), brinSetHeapBlockItemptr(), BTPageGetDeleteXid(), BTPageSetDeleted(), fsm_get_avail(), fsm_get_max_avail(), fsm_page_contents(), fsm_rebuild_page(), fsm_search_avail(), fsm_set_avail(), fsm_truncate_avail(), fsm_vacuum_page(), GistPageGetDeleteXid(), GistPageSetDeleted(), revmap_physical_extend(), visibilitymap_clear(), visibilitymap_count(), visibilitymap_get_status(), visibilitymap_prepare_truncate(), and visibilitymap_set().
Definition at line 947 of file bufpage.c.
Referenced by _bt_bottomupdel_pass(), _bt_dedup_pass(), _bt_findsplitloc(), allocNewBuffer(), brin_can_do_samepage_update(), doPickSplit(), GetHashPageStats(), ginHeapTupleFastInsert(), pgstat_heap(), pgstat_index_page(), pgstatindex_impl(), spgAddNodeAction(), SpGistGetBuffer(), SpGistPageAddNewItem(), SpGistSetLastUsedPage(), statapprox_heap(), and writeListPage().
Definition at line 896 of file bufpage.c.
Referenced by _bt_buildadd(), _bt_delete_or_dedup_one_page(), _bt_findinsertloc(), _bt_insertonpg(), _bt_search_insert(), _hash_doinsert(), br_page_get_freespace(), entryIsEnoughSpace(), GetBTPageStatistics(), GetHashPageStatistics(), gist_indexsortbuild_levelstate_add(), gistnospace(), heap_xlog_visible(), PageGetHeapFreeSpace(), and terminate_brin_buildstate().
Definition at line 923 of file bufpage.c.
Referenced by _hash_splitbucket(), and _hash_squeezebucket().
Definition at line 980 of file bufpage.c.
References FirstOffsetNumber, ItemIdIsUsed, MaxHeapTuplesPerPage, OffsetNumberNext, PageGetFreeSpace(), PageGetItemId(), PageGetMaxOffsetNumber(), and PageHasFreeLinePointers().
Referenced by heap_multi_insert(), heap_page_prune_opt(), heap_update(), heap_xlog_insert(), heap_xlog_multi_insert(), heap_xlog_prune_freeze(), heap_xlog_update(), lazy_scan_heap(), lazy_scan_new_or_empty(), lazy_vacuum_heap_rel(), raw_heap_insert(), and RelationGetBufferForTuple().
Definition at line 354 of file bufpage.h.
References Assert, ItemIdGetOffset, and ItemIdHasStorage.
Referenced by _bt_afternewitemoff(), _bt_binsrch_posting(), _bt_bottomupdel_finish_pending(), _bt_bottomupdel_pass(), _bt_buildadd(), _bt_check_natts(), _bt_check_unique(), _bt_checkkeys_look_ahead(), _bt_compare(), _bt_deadblocks(), _bt_dedup_pass(), _bt_delitems_delete_check(), _bt_do_singleval(), _bt_get_endpoint(), _bt_getstackbuf(), _bt_insert_parent(), _bt_insertonpg(), _bt_killitems(), _bt_mark_page_halfdead(), _bt_newlevel(), _bt_pagedel(), _bt_readpage(), _bt_recsplitloc(), _bt_search(), _bt_simpledel_pass(), _bt_split(), _bt_split_firstright(), _bt_split_lastleft(), _bt_strategy(), _bt_unlink_halfdead_page(), _hash_binsearch(), _hash_binsearch_last(), _hash_finish_split(), _hash_kill_items(), _hash_load_qualified_items(), _hash_pgaddtup(), _hash_splitbucket(), _hash_squeezebucket(), addLeafTuple(), addOrReplaceTuple(), brin_doupdate(), brin_evacuate_page(), brin_page_items(), brinGetTupleForHeapBlock(), bt_check_level_from_leftmost(), bt_child_check(), bt_child_highkey_check(), bt_downlink_missing_check(), bt_page_print_tuples(), bt_right_page_check_scankey(), bt_target_page_check(), btree_xlog_dedup(), btree_xlog_insert(), btree_xlog_mark_page_halfdead(), btree_xlog_split(), btree_xlog_updates(), btvacuumpage(), checkSplitConditions(), collect_corrupt_items(), collectMatchBitmap(), collectMatchesForHeapRow(), doPickSplit(), entryFindChildPtr(), entryGetLeftMostPage(), entryIsEnoughSpace(), entryLocateEntry(), entryLocateLeafEntry(), entryPreparePage(), entrySplitPage(), GetBTPageStatistics(), getRightMostTuple(), ginbulkdelete(), ginEntryInsert(), ginRedoInsertEntry(), ginVacuumEntryPage(), gist_page_items(), gist_page_items_bytea(), gistBufferingFindCorrectParent(), gistbufferinginserttuples(), gistchoose(), gistdeletepage(), gistdoinsert(), gistextractpage(), gistFindCorrectParent(), gistFindPath(), gistformdownlink(), gistGetMaxLevel(), gistMemorizeAllDownlinks(), gistnospace(), gistProcessItup(), gistScanPage(), gistvacuum_delete_empty_pages(), gistvacuumpage(), hash_page_items(), hashbucketcleanup(), heap_abort_speculative(), heap_delete(), heap_fetch(), heap_finish_speculative(), heap_force_common(), heap_freeze_prepared_tuples(), heap_get_latest_tid(), heap_get_root_tuples(), heap_hot_search_buffer(), heap_index_delete_tuples(), heap_lock_tuple(), heap_page_is_all_visible(), heap_page_items(), heap_page_prune_and_freeze(), heap_page_prune_execute(), heap_pre_freeze_checks(), heap_prune_chain(), heap_prune_record_unchanged_lp_normal(), heap_update(), heap_xlog_confirm(), heap_xlog_delete(), heap_xlog_inplace(), heap_xlog_lock(), heap_xlog_lock_updated(), heap_xlog_prune_freeze(), heap_xlog_update(), heapam_scan_analyze_next_tuple(), heapam_scan_bitmap_next_block(), heapam_scan_bitmap_next_tuple(), heapam_scan_sample_next_tuple(), heapgettup(), heapgettup_pagemode(), index_compute_xid_horizon_for_tuples(), index_delete_check_htid(), invariant_l_nontarget_offset(), invariant_l_offset(), lazy_scan_noprune(), matchPartialInPendingList(), moveLeafs(), page_collect_tuples(), page_verify_redirects(), PageIndexTupleOverwrite(), processPendingPage(), raw_heap_insert(), read_seq_tuple(), RelationPutHeapTuple(), saveNodeLink(), scanGetCandidate(), ScanSourceDatabasePgClassPage(), setRedirectionTuple(), spgdoinsert(), SpGistPageAddNewItem(), spgprocesspending(), spgRedoAddLeaf(), spgRedoAddNode(), spgRedoMoveLeafs(), spgRedoPickSplit(), spgRedoVacuumLeaf(), spgRedoVacuumRedirect(), spgSplitNodeAction(), spgTestLeafTuple(), spgWalk(), startScanEntry(), statapprox_heap(), vacuumLeafPage(), vacuumLeafRoot(), vacuumRedirectAndPlaceholder(), and verify_heapam().
|
inlinestatic |
Definition at line 243 of file bufpage.h.
Referenced by _bt_afternewitemoff(), _bt_binsrch_posting(), _bt_bottomupdel_finish_pending(), _bt_bottomupdel_pass(), _bt_buildadd(), _bt_check_natts(), _bt_check_unique(), _bt_checkkeys_look_ahead(), _bt_compare(), _bt_deadblocks(), _bt_dedup_pass(), _bt_delete_or_dedup_one_page(), _bt_delitems_delete_check(), _bt_do_singleval(), _bt_findsplitloc(), _bt_get_endpoint(), _bt_getstackbuf(), _bt_insert_parent(), _bt_insertonpg(), _bt_killitems(), _bt_mark_page_halfdead(), _bt_newlevel(), _bt_pagedel(), _bt_readpage(), _bt_recsplitloc(), _bt_search(), _bt_simpledel_pass(), _bt_slideleft(), _bt_split(), _bt_split_firstright(), _bt_split_lastleft(), _bt_split_penalty(), _bt_strategy(), _bt_unlink_halfdead_page(), _hash_binsearch(), _hash_binsearch_last(), _hash_finish_split(), _hash_kill_items(), _hash_load_qualified_items(), _hash_pgaddtup(), _hash_splitbucket(), _hash_squeezebucket(), _hash_vacuum_one_page(), addLeafTuple(), addOrReplaceTuple(), brin_doupdate(), brin_evacuate_page(), brin_page_items(), brin_start_evacuating_page(), brinGetTupleForHeapBlock(), brininsert(), brinRevmapDesummarizeRange(), bt_page_print_tuples(), btree_xlog_dedup(), btree_xlog_insert(), btree_xlog_mark_page_halfdead(), btree_xlog_split(), btree_xlog_updates(), btvacuumpage(), checkSplitConditions(), collect_corrupt_items(), collectMatchBitmap(), collectMatchesForHeapRow(), compactify_tuples(), count_nondeletable_pages(), doPickSplit(), entryFindChildPtr(), entryGetLeftMostPage(), entryIsEnoughSpace(), entryLocateEntry(), entryLocateLeafEntry(), entryPreparePage(), entrySplitPage(), GetBTPageStatistics(), GetHashPageStatistics(), GetHashPageStats(), getRightMostTuple(), ginbulkdelete(), ginEntryInsert(), ginRedoInsertEntry(), ginVacuumEntryPage(), gist_page_items(), gist_page_items_bytea(), gistBufferingFindCorrectParent(), gistbufferinginserttuples(), gistchoose(), gistdeletepage(), gistdoinsert(), gistextractpage(), gistFindCorrectParent(), gistFindPath(), gistformdownlink(), gistGetMaxLevel(), gistkillitems(), gistMemorizeAllDownlinks(), gistnospace(), gistProcessItup(), gistprunepage(), gistScanPage(), gistvacuum_delete_empty_pages(), gistvacuumpage(), hash_page_items(), hashbucketcleanup(), heap_abort_speculative(), heap_delete(), heap_fetch(), heap_finish_speculative(), heap_force_common(), heap_freeze_prepared_tuples(), heap_get_latest_tid(), heap_get_root_tuples(), heap_hot_search_buffer(), heap_index_delete_tuples(), heap_lock_tuple(), heap_mask(), heap_page_is_all_visible(), heap_page_items(), heap_page_prune_and_freeze(), heap_page_prune_execute(), heap_pre_freeze_checks(), heap_prune_chain(), heap_prune_record_unchanged_lp_normal(), heap_update(), heap_xlog_confirm(), heap_xlog_delete(), heap_xlog_inplace(), heap_xlog_lock(), heap_xlog_lock_updated(), heap_xlog_prune_freeze(), heap_xlog_update(), heapam_scan_analyze_next_tuple(), heapam_scan_bitmap_next_block(), heapam_scan_bitmap_next_tuple(), heapam_scan_sample_next_tuple(), heapgettup(), heapgettup_pagemode(), index_compute_xid_horizon_for_tuples(), index_delete_check_htid(), lazy_scan_noprune(), lazy_vacuum_heap_page(), mask_lp_flags(), matchPartialInPendingList(), moveLeafs(), page_collect_tuples(), page_verify_redirects(), PageAddItemExtended(), PageGetHeapFreeSpace(), PageGetItemIdCareful(), PageIndexMultiDelete(), PageIndexTupleDelete(), PageIndexTupleDeleteNoCompact(), PageIndexTupleOverwrite(), PageRepairFragmentation(), PageTruncateLinePointerArray(), pgstat_index_page(), processPendingPage(), raw_heap_insert(), read_seq_tuple(), RelationPutHeapTuple(), saveNodeLink(), scanGetCandidate(), ScanSourceDatabasePgClassPage(), setRedirectionTuple(), spgdoinsert(), SpGistPageAddNewItem(), spgprocesspending(), spgRedoAddLeaf(), spgRedoAddNode(), spgRedoMoveLeafs(), spgRedoPickSplit(), spgRedoVacuumLeaf(), spgRedoVacuumRedirect(), spgSplitNodeAction(), spgTestLeafTuple(), spgWalk(), startScanEntry(), statapprox_heap(), vacuumLeafPage(), vacuumLeafRoot(), vacuumRedirectAndPlaceholder(), and verify_heapam().
|
inlinestatic |
Definition at line 386 of file bufpage.h.
References PageXLogRecPtrGet().
Referenced by _bt_dedup_pass(), _bt_split(), bt_check_level_from_leftmost(), bt_downlink_missing_check(), bt_leftmost_ignoring_half_dead(), BufferGetLSNAtomic(), gist_page_opaque_info(), gistdoinsert(), gistFindCorrectParent(), lazy_scan_new_or_empty(), nextval_internal(), page_header(), verify_page_checksum(), verifyBackupPageConsistency(), XLogCheckBufferNeedsBackup(), XLogReadBufferForRedoExtended(), and XLogRecordAssemble().
|
inlinestatic |
Definition at line 372 of file bufpage.h.
References PageHeaderData::pd_lower, and SizeOfPageHeaderData.
Referenced by _bt_binsrch(), _bt_binsrch_insert(), _bt_bottomupdel_pass(), _bt_check_natts(), _bt_check_unique(), _bt_dedup_finish_pending(), _bt_dedup_pass(), _bt_delete_or_dedup_one_page(), _bt_do_singleval(), _bt_endpoint(), _bt_findinsertloc(), _bt_findsplitloc(), _bt_get_endpoint(), _bt_getstackbuf(), _bt_killitems(), _bt_lock_subtree_parent(), _bt_mark_page_halfdead(), _bt_pagedel(), _bt_readnextpage(), _bt_readpage(), _bt_search_insert(), _bt_slideleft(), _bt_split(), _bt_unlink_halfdead_page(), _hash_binsearch(), _hash_binsearch_last(), _hash_finish_split(), _hash_kill_items(), _hash_load_qualified_items(), _hash_pgaddtup(), _hash_splitbucket(), _hash_squeezebucket(), _hash_vacuum_one_page(), addOrReplaceTuple(), brin_doupdate(), brin_evacuate_page(), brin_page_items(), brin_start_evacuating_page(), brin_xlog_insert_update(), brinGetTupleForHeapBlock(), brinRevmapDesummarizeRange(), bt_child_check(), bt_child_highkey_check(), bt_page_items_bytea(), bt_page_items_internal(), bt_right_page_check_scankey(), bt_rootdescend(), bt_target_page_check(), btree_xlog_dedup(), btvacuumpage(), checkSplitConditions(), collect_corrupt_items(), compactify_tuples(), count_nondeletable_pages(), doPickSplit(), entryFindChildPtr(), entryGetLeftMostPage(), entryLocateEntry(), entryLocateLeafEntry(), entrySplitPage(), GetBTPageStatistics(), GetHashPageStatistics(), GetHashPageStats(), getRightMostTuple(), ginbulkdelete(), ginHeapTupleFastInsert(), ginInsertCleanup(), ginRedoInsertEntry(), ginRedoUpdateMetapage(), ginvacuumcleanup(), ginVacuumEntryPage(), ginVacuumPostingTreeLeaves(), gist_page_items(), gist_page_items_bytea(), gistBufferingFindCorrectParent(), gistbufferinginserttuples(), gistchoose(), gistdeletepage(), gistextractpage(), gistfillbuffer(), gistFindCorrectParent(), gistFindPath(), gistformdownlink(), gistMemorizeAllDownlinks(), gistprunepage(), gistRedoPageUpdateRecord(), gistScanPage(), gistvacuum_delete_empty_pages(), gistvacuumpage(), hash_page_items(), hashbucketcleanup(), heap_fetch(), heap_finish_speculative(), heap_force_common(), heap_get_latest_tid(), heap_get_root_tuples(), heap_hot_search_buffer(), heap_index_delete_tuples(), heap_insert(), heap_mask(), heap_multi_insert(), heap_page_is_all_visible(), heap_page_items(), heap_page_prune_and_freeze(), heap_prepare_pagescan(), heap_xlog_confirm(), heap_xlog_delete(), heap_xlog_inplace(), heap_xlog_insert(), heap_xlog_lock(), heap_xlog_lock_updated(), heap_xlog_multi_insert(), heap_xlog_update(), heapam_scan_analyze_next_tuple(), heapam_scan_bitmap_next_block(), heapam_scan_sample_next_tuple(), heapgettup_continue_page(), heapgettup_start_page(), lazy_scan_noprune(), log_heap_update(), mask_lp_flags(), moveLeafs(), moveRightIfItNeeded(), page_verify_redirects(), PageAddItemExtended(), PageGetHeapFreeSpace(), PageIndexMultiDelete(), PageIndexTupleDelete(), PageIndexTupleDeleteNoCompact(), PageIndexTupleOverwrite(), PageRepairFragmentation(), PageTruncateLinePointerArray(), palloc_btree_page(), pgstat_btree_page(), pgstat_gist_page(), pgstat_hash_page(), processPendingPage(), RelationGetBufferForTuple(), scanGetCandidate(), ScanSourceDatabasePgClassPage(), SpGistPageAddNewItem(), spgRedoVacuumRedirect(), spgWalk(), statapprox_heap(), vacuumLeafPage(), vacuumLeafRoot(), vacuumRedirectAndPlaceholder(), and verify_heapam().
Definition at line 276 of file bufpage.h.
Referenced by _bt_findsplitloc(), _bt_singleval_fillfactor(), dataSplitPageInternal(), entrySplitPage(), GetBTPageStatistics(), GetHashPageStatistics(), page_header(), PageGetSpecialSize(), PageGetTempPage(), PageGetTempPageCopy(), PageGetTempPageCopySpecial(), and PageRestoreTempPage().
|
inlinestatic |
Definition at line 339 of file bufpage.h.
References PageValidateSpecialPointer().
Referenced by fill_seq_fork_with_data(), ginRedoRecompress(), PageGetTempPageCopySpecial(), read_seq_tuple(), and seq_redo().
Definition at line 316 of file bufpage.h.
References PageGetPageSize().
Referenced by _bt_checkpage(), _hash_checkpage(), brin_page_type(), bt_page_items_bytea(), gin_leafpage_items(), gin_metapage_info(), gin_page_opaque_info(), gistcheckpage(), PageGetTempPageCopySpecial(), pgstat_hash_page(), pgstathashindex(), verify_brin_page(), verify_gist_page(), and verify_hash_page().
Definition at line 354 of file bufpage.c.
References PageGetPageSize(), and palloc().
Referenced by _bt_split(), dataSplitPageInternal(), and ginPlaceToPage().
Definition at line 371 of file bufpage.c.
References PageGetPageSize(), and palloc().
Referenced by entrySplitPage(), and ginVacuumEntryPage().
Definition at line 391 of file bufpage.c.
References PageGetPageSize(), PageGetSpecialPointer(), PageGetSpecialSize(), PageInit(), and palloc().
Referenced by _bt_dedup_pass(), btree_xlog_dedup(), btree_xlog_split(), and gistplacetopage().
Definition at line 397 of file bufpage.h.
References PD_HAS_FREE_LINES.
Referenced by PageAddItemExtended(), and PageGetHeapFreeSpace().
void PageIndexMultiDelete | ( | Page | page, |
OffsetNumber * | itemnos, | ||
int | nitems | ||
) |
Definition at line 1150 of file bufpage.c.
References itemIdCompactData::alignedlen, Assert, compactify_tuples(), elog, ereport, errcode(), ERRCODE_DATA_CORRUPTED, errmsg(), ERROR, FirstOffsetNumber, ItemIdGetLength, ItemIdGetOffset, ItemIdHasStorage, itemIdCompactData::itemoff, MAXALIGN, MaxIndexTuplesPerPage, nitems, itemIdCompactData::offsetindex, OffsetNumberNext, PageGetItemId(), PageGetMaxOffsetNumber(), PageIndexTupleDelete(), PageHeaderData::pd_linp, PageHeaderData::pd_lower, PageHeaderData::pd_special, PageHeaderData::pd_upper, size, and SizeOfPageHeaderData.
Referenced by _bt_delitems_delete(), _bt_delitems_vacuum(), _hash_squeezebucket(), _hash_vacuum_one_page(), btree_xlog_delete(), btree_xlog_vacuum(), gistprunepage(), gistRedoDeleteRecord(), gistRedoPageUpdateRecord(), gistvacuumpage(), hash_xlog_delete(), hash_xlog_move_page_contents(), hash_xlog_vacuum_one_page(), hashbucketcleanup(), spgPageIndexMultiDelete(), spgRedoVacuumRedirect(), spgRedoVacuumRoot(), vacuumLeafRoot(), and vacuumRedirectAndPlaceholder().
void PageIndexTupleDelete | ( | Page | page, |
OffsetNumber | offnum | ||
) |
Definition at line 1041 of file bufpage.c.
References Assert, elog, ereport, errcode(), ERRCODE_DATA_CORRUPTED, errmsg(), ERROR, i, if(), ItemIdGetLength, ItemIdGetOffset, ItemIdHasStorage, ItemIdData::lp_off, MAXALIGN, PageGetItemId(), PageGetMaxOffsetNumber(), PageIsEmpty(), PageHeaderData::pd_linp, PageHeaderData::pd_lower, PageHeaderData::pd_special, PageHeaderData::pd_upper, size, and SizeOfPageHeaderData.
Referenced by _bt_mark_page_halfdead(), addLeafTuple(), addOrReplaceTuple(), btree_xlog_mark_page_halfdead(), entryPreparePage(), ginRedoInsertEntry(), ginVacuumEntryPage(), gistdeletepage(), gistplacetopage(), gistRedoPageDelete(), PageIndexMultiDelete(), spgAddNodeAction(), SpGistPageAddNewItem(), spgRedoAddLeaf(), spgRedoAddNode(), spgRedoSplitTuple(), and spgSplitNodeAction().
void PageIndexTupleDeleteNoCompact | ( | Page | page, |
OffsetNumber | offnum | ||
) |
Definition at line 1284 of file bufpage.c.
References Assert, elog, ereport, errcode(), ERRCODE_DATA_CORRUPTED, errmsg(), ERROR, i, if(), ItemIdGetLength, ItemIdGetOffset, ItemIdHasStorage, ItemIdSetUnused, ItemIdData::lp_off, MAXALIGN, PageGetItemId(), PageGetMaxOffsetNumber(), PageIsEmpty(), PageHeaderData::pd_lower, PageHeaderData::pd_special, PageHeaderData::pd_upper, size, and SizeOfPageHeaderData.
Referenced by brin_doupdate(), brin_xlog_desummarize_page(), brin_xlog_update(), and brinRevmapDesummarizeRange().
bool PageIndexTupleOverwrite | ( | Page | page, |
OffsetNumber | offnum, | ||
Item | newtup, | ||
Size | newsize | ||
) |
Definition at line 1394 of file bufpage.c.
References Assert, elog, ereport, errcode(), ERRCODE_DATA_CORRUPTED, errmsg(), ERROR, FirstOffsetNumber, i, ItemIdGetLength, ItemIdGetOffset, ItemIdHasStorage, ItemIdData::lp_len, ItemIdData::lp_off, MAXALIGN, PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), PageHeaderData::pd_lower, PageHeaderData::pd_special, PageHeaderData::pd_upper, and SizeOfPageHeaderData.
Referenced by _bt_buildadd(), _bt_delitems_delete(), _bt_delitems_vacuum(), _bt_mark_page_halfdead(), brin_doupdate(), brin_xlog_samepage_update(), btree_xlog_updates(), gistplacetopage(), and gistRedoPageUpdateRecord().
Definition at line 42 of file bufpage.c.
References Assert, MAXALIGN, MemSet, PageSetPageSizeAndVersion(), PageHeaderData::pd_flags, PageHeaderData::pd_lower, PageHeaderData::pd_special, PageHeaderData::pd_upper, PG_PAGE_LAYOUT_VERSION, and SizeOfPageHeaderData.
Referenced by _bt_pageinit(), _hash_pageinit(), BloomInitPage(), brin_page_init(), fill_seq_fork_with_data(), fsm_readbuf(), GinInitPage(), gistinitpage(), heap_xlog_insert(), heap_xlog_multi_insert(), heap_xlog_update(), heap_xlog_visible(), PageGetTempPageCopySpecial(), raw_heap_insert(), RelationAddBlocks(), RelationGetBufferForTuple(), seq_redo(), SpGistInitPage(), vm_readbuf(), and XLogRecordPageWithFreeSpace().
Definition at line 429 of file bufpage.h.
References PD_ALL_VISIBLE.
Referenced by collect_visibility_data(), GetVisibilityMapPins(), heap_abort_speculative(), heap_delete(), heap_force_common(), heap_insert(), heap_lock_tuple(), heap_lock_updated_tuple_rec(), heap_multi_insert(), heap_prepare_pagescan(), heap_update(), heapam_scan_sample_next_tuple(), lazy_scan_new_or_empty(), lazy_scan_prune(), lazy_vacuum_heap_page(), pg_visibility(), RelationGetBufferForTuple(), and visibilitymap_set().
Definition at line 223 of file bufpage.h.
References SizeOfPageHeaderData.
Referenced by _hash_squeezebucket(), count_nondeletable_pages(), ginHeapTupleFastInsert(), ginRedoUpdateMetapage(), gistfillbuffer(), GistPageSetDeleted(), gistRedoPageUpdateRecord(), lazy_scan_new_or_empty(), PageIndexTupleDelete(), PageIndexTupleDeleteNoCompact(), ScanSourceDatabasePgClass(), SpGistGetBuffer(), SpGistNewBuffer(), spgvacuumpage(), and statapprox_heap().
Definition at line 413 of file bufpage.h.
References PD_PAGE_FULL.
Referenced by heap_page_prune_and_freeze(), and heap_page_prune_opt().
Definition at line 233 of file bufpage.h.
Referenced by _bt_allocbuf(), _bt_checkpage(), _hash_checkpage(), blbulkdelete(), blgetbitmap(), blinsert(), BloomNewBuffer(), BloomPageAddItem(), blvacuumcleanup(), brin_metapage_info(), brin_page_cleanup(), brin_page_items(), brin_page_type(), brin_revmap_data(), brin_start_evacuating_page(), bt_page_items_bytea(), BTPageGetDeleteXid(), BTPageIsRecyclable(), btvacuumpage(), count_nondeletable_pages(), ExtendBufferedRelShared(), fsm_page_contents(), fsm_readbuf(), gin_leafpage_items(), gin_metapage_info(), gin_page_opaque_info(), GinPageIsRecyclable(), gist_page_items(), gist_page_items_bytea(), gist_page_opaque_info(), gistcheckpage(), gistdeletepage(), gistNewBuffer(), gistPageRecyclable(), gistvacuum_delete_empty_pages(), hash_page_type(), heap_xlog_visible(), lazy_scan_new_or_empty(), log_newpage(), log_newpage_range(), log_newpages(), page_checksum_internal(), PageIsVerifiedExtended(), PageSetChecksumCopy(), PageSetChecksumInplace(), pg_checksum_page(), pgstat_btree_page(), pgstathashindex(), RelationAddBlocks(), RelationGetBufferForTuple(), revmap_physical_extend(), scan_file(), ScanSourceDatabasePgClass(), SpGistGetBuffer(), SpGistNewBuffer(), spgprocesspending(), spgvacuumpage(), statapprox_heap(), verify_brin_page(), verify_gist_page(), verify_hash_page(), verify_page_checksum(), vm_readbuf(), XLogReadBufferExtended(), XLogReadBufferForRedoExtended(), and XLogRecordPageWithFreeSpace().
bool PageIsVerifiedExtended | ( | Page | page, |
BlockNumber | blkno, | ||
int | flags | ||
) |
Definition at line 88 of file bufpage.c.
References checksum_failure, DataChecksumsEnabled(), ereport, errcode(), ERRCODE_DATA_CORRUPTED, errmsg(), ignore_checksum_failure, MAXALIGN, PageIsNew(), PageHeaderData::pd_checksum, PageHeaderData::pd_flags, PageHeaderData::pd_lower, PageHeaderData::pd_special, PageHeaderData::pd_upper, PD_VALID_FLAG_BITS, pg_checksum_page(), pg_memory_is_all_zeros(), pgstat_report_checksum_failure(), PIV_LOG_WARNING, PIV_REPORT_STAT, and WARNING.
Referenced by RelationCopyStorage(), and WaitReadBuffers().
void PageRepairFragmentation | ( | Page | page | ) |
Definition at line 688 of file bufpage.c.
References itemIdCompactData::alignedlen, Assert, compactify_tuples(), ereport, errcode(), ERRCODE_DATA_CORRUPTED, errmsg(), ERROR, FirstOffsetNumber, i, InvalidOffsetNumber, ItemIdGetLength, ItemIdGetOffset, ItemIdHasStorage, ItemIdIsUsed, ItemIdSetUnused, itemIdCompactData::itemoff, MAXALIGN, MaxHeapTuplesPerPage, itemIdCompactData::offsetindex, PageClearHasFreeLinePointers(), PageGetItemId(), PageGetMaxOffsetNumber(), PageSetHasFreeLinePointers(), SizeOfPageHeaderData, and unlikely.
Referenced by heap_page_prune_execute().
Definition at line 413 of file bufpage.c.
References PageGetPageSize(), and pfree().
Referenced by _bt_dedup_pass(), _bt_split(), btree_xlog_dedup(), btree_xlog_split(), createPostingTree(), ginbulkdelete(), and gistplacetopage().
|
inlinestatic |
Definition at line 434 of file bufpage.h.
References PD_ALL_VISIBLE.
Referenced by heap_multi_insert(), heap_xlog_insert(), heap_xlog_multi_insert(), heap_xlog_visible(), lazy_scan_new_or_empty(), lazy_scan_prune(), and lazy_vacuum_heap_page().
char* PageSetChecksumCopy | ( | Page | page, |
BlockNumber | blkno | ||
) |
Definition at line 1499 of file bufpage.c.
References DataChecksumsEnabled(), MemoryContextAllocAligned(), PageIsNew(), pg_checksum_page(), PG_IO_ALIGN_SIZE, and TopMemoryContext.
Referenced by FlushBuffer().
void PageSetChecksumInplace | ( | Page | page, |
BlockNumber | blkno | ||
) |
Definition at line 1531 of file bufpage.c.
References DataChecksumsEnabled(), PageIsNew(), and pg_checksum_page().
Referenced by _hash_alloc_buckets(), FlushRelationBuffers(), GetLocalVictimBuffer(), and smgr_bulk_flush().
|
inlinestatic |
|
inlinestatic |
Definition at line 402 of file bufpage.h.
References PD_HAS_FREE_LINES.
Referenced by PageRepairFragmentation(), and PageTruncateLinePointerArray().
|
inlinestatic |
Definition at line 391 of file bufpage.h.
References PageXLogRecPtrSet.
Referenced by _bt_clear_incomplete_split(), _bt_dedup_pass(), _bt_delitems_delete(), _bt_delitems_vacuum(), _bt_getroot(), _bt_insertonpg(), _bt_mark_page_halfdead(), _bt_newlevel(), _bt_restore_meta(), _bt_set_cleanup_info(), _bt_split(), _bt_unlink_halfdead_page(), _hash_addovflpage(), _hash_doinsert(), _hash_expandtable(), _hash_freeovflpage(), _hash_init(), _hash_splitbucket(), _hash_squeezebucket(), _hash_vacuum_one_page(), addLeafTuple(), brin_doinsert(), brin_doupdate(), brin_xlog_createidx(), brin_xlog_desummarize_page(), brin_xlog_insert_update(), brin_xlog_revmap_extend(), brin_xlog_samepage_update(), brin_xlog_update(), brinbuild(), brinRevmapDesummarizeRange(), btree_xlog_dedup(), btree_xlog_delete(), btree_xlog_insert(), btree_xlog_mark_page_halfdead(), btree_xlog_newroot(), btree_xlog_split(), btree_xlog_unlink_page(), btree_xlog_vacuum(), createPostingTree(), do_setval(), doPickSplit(), fill_seq_fork_with_data(), generic_redo(), GenericXLogFinish(), ginDeletePage(), ginHeapTupleFastInsert(), ginPlaceToPage(), ginRedoClearIncompleteSplit(), ginRedoCreatePTree(), ginRedoDeleteListPages(), ginRedoDeletePage(), ginRedoInsert(), ginRedoInsertListPage(), ginRedoUpdateMetapage(), ginRedoVacuumDataLeafPage(), ginUpdateStats(), ginVacuumPostingTreeLeaf(), gist_indexsortbuild(), gist_indexsortbuild_levelstate_flush(), gistbuild(), gistdeletepage(), gistplacetopage(), gistprunepage(), gistRedoClearFollowRight(), gistRedoDeleteRecord(), gistRedoPageDelete(), gistRedoPageSplitRecord(), gistRedoPageUpdateRecord(), gistvacuumpage(), hash_xlog_add_ovfl_page(), hash_xlog_delete(), hash_xlog_init_bitmap_page(), hash_xlog_init_meta_page(), hash_xlog_insert(), hash_xlog_move_page_contents(), hash_xlog_split_allocate_page(), hash_xlog_split_cleanup(), hash_xlog_split_complete(), hash_xlog_squeeze_page(), hash_xlog_update_meta_page(), hash_xlog_vacuum_one_page(), hashbucketcleanup(), hashbulkdelete(), heap_abort_speculative(), heap_delete(), heap_finish_speculative(), heap_inplace_update_and_unlock(), heap_insert(), heap_lock_tuple(), heap_lock_updated_tuple_rec(), heap_multi_insert(), heap_update(), heap_xlog_confirm(), heap_xlog_delete(), heap_xlog_inplace(), heap_xlog_insert(), heap_xlog_lock(), heap_xlog_lock_updated(), heap_xlog_multi_insert(), heap_xlog_prune_freeze(), heap_xlog_update(), heap_xlog_visible(), log_heap_prune_and_freeze(), log_newpage(), log_newpage_range(), log_newpages(), log_split_page(), MarkBufferDirtyHint(), moveLeafs(), nextval_internal(), revmap_physical_extend(), seq_redo(), shiftList(), spgAddNodeAction(), spgRedoAddLeaf(), spgRedoAddNode(), spgRedoMoveLeafs(), spgRedoPickSplit(), spgRedoSplitTuple(), spgRedoVacuumLeaf(), spgRedoVacuumRedirect(), spgRedoVacuumRoot(), spgSplitNodeAction(), vacuumLeafPage(), vacuumLeafRoot(), vacuumRedirectAndPlaceholder(), visibilitymap_set(), writeListPage(), XLogReadBufferForRedoExtended(), and xlogVacuumPage().
void PageTruncateLinePointerArray | ( | Page | page | ) |
Definition at line 824 of file bufpage.c.
References Assert, FirstOffsetNumber, i, ItemIdIsUsed, PageClearHasFreeLinePointers(), PageGetItemId(), PageGetMaxOffsetNumber(), PageSetHasFreeLinePointers(), and PageHeaderData::pd_lower.
Referenced by heap_page_prune_execute(), and lazy_vacuum_heap_page().
|
inlinestatic |
Definition at line 327 of file bufpage.h.
References Assert, and SizeOfPageHeaderData.
Referenced by PageGetSpecialPointer().
|
inlinestatic |
StaticAssertDecl | ( | BLCKSZ | = =((BLCKSZ/sizeof(size_t)) *sizeof(size_t)) , |
"BLCKSZ has to be a multiple of sizeof(size_t)" | |||
) |
|
extern |
Definition at line 27 of file bufpage.c.
Referenced by PageIsVerifiedExtended().