PostgreSQL Source Code
git master
|
Go to the source code of this file.
Functions | |
Size | GetRecordedFreeSpace (Relation rel, BlockNumber heapBlk) |
BlockNumber | GetPageWithFreeSpace (Relation rel, Size spaceNeeded) |
BlockNumber | RecordAndGetPageWithFreeSpace (Relation rel, BlockNumber oldPage, Size oldSpaceAvail, Size spaceNeeded) |
void | RecordPageWithFreeSpace (Relation rel, BlockNumber heapBlk, Size spaceAvail) |
void | XLogRecordPageWithFreeSpace (RelFileLocator rlocator, BlockNumber heapBlk, Size spaceAvail) |
BlockNumber | FreeSpaceMapPrepareTruncateRel (Relation rel, BlockNumber nblocks) |
void | FreeSpaceMapVacuum (Relation rel) |
void | FreeSpaceMapVacuumRange (Relation rel, BlockNumber start, BlockNumber end) |
BlockNumber FreeSpaceMapPrepareTruncateRel | ( | Relation | rel, |
BlockNumber | nblocks | ||
) |
Definition at line 275 of file freespace.c.
References buf, BUFFER_LOCK_EXCLUSIVE, BufferGetPage(), BufferIsValid(), END_CRIT_SECTION, FSM_FORKNUM, fsm_get_location(), fsm_logical_to_physical(), fsm_readbuf(), fsm_truncate_avail(), InRecovery, InvalidBlockNumber, LockBuffer(), log_newpage_buffer(), MarkBufferDirty(), RelationGetSmgr(), RelationNeedsWAL, smgrexists(), smgrnblocks(), START_CRIT_SECTION, UnlockReleaseBuffer(), and XLogHintBitIsNeeded.
Referenced by RelationTruncate(), and smgr_redo().
void FreeSpaceMapVacuum | ( | Relation | rel | ) |
Definition at line 358 of file freespace.c.
References FSM_ROOT_ADDRESS, fsm_vacuum_page(), and InvalidBlockNumber.
Referenced by brin_vacuum_scan(), and IndexFreeSpaceMapVacuum().
void FreeSpaceMapVacuumRange | ( | Relation | rel, |
BlockNumber | start, | ||
BlockNumber | end | ||
) |
Definition at line 377 of file freespace.c.
References FSM_ROOT_ADDRESS, fsm_vacuum_page(), and start.
Referenced by brin_doinsert(), brin_doupdate(), brin_getinsertbuffer(), lazy_scan_heap(), RelationAddBlocks(), RelationTruncate(), smgr_redo(), and terminate_brin_buildstate().
BlockNumber GetPageWithFreeSpace | ( | Relation | rel, |
Size | spaceNeeded | ||
) |
Definition at line 137 of file freespace.c.
References fsm_search(), and fsm_space_needed_to_cat().
Referenced by brin_getinsertbuffer(), GetFreeIndexPage(), and RelationGetBufferForTuple().
Size GetRecordedFreeSpace | ( | Relation | rel, |
BlockNumber | heapBlk | ||
) |
Definition at line 244 of file freespace.c.
References buf, BufferGetPage(), BufferIsValid(), fsm_get_avail(), fsm_get_location(), fsm_readbuf(), fsm_space_cat_to_avail(), and ReleaseBuffer().
Referenced by lazy_scan_new_or_empty(), pg_freespace(), and statapprox_heap().
BlockNumber RecordAndGetPageWithFreeSpace | ( | Relation | rel, |
BlockNumber | oldPage, | ||
Size | oldSpaceAvail, | ||
Size | spaceNeeded | ||
) |
Definition at line 154 of file freespace.c.
References fsm_does_block_exist(), fsm_get_heap_blk(), fsm_get_location(), fsm_search(), fsm_set_and_search(), fsm_space_avail_to_cat(), and fsm_space_needed_to_cat().
Referenced by brin_getinsertbuffer(), and RelationGetBufferForTuple().
void RecordPageWithFreeSpace | ( | Relation | rel, |
BlockNumber | heapBlk, | ||
Size | spaceAvail | ||
) |
Definition at line 194 of file freespace.c.
References fsm_get_location(), fsm_set_and_search(), and fsm_space_avail_to_cat().
Referenced by brin_doinsert(), brin_doupdate(), brin_initialize_empty_new_buffer(), brin_page_cleanup(), lazy_scan_heap(), lazy_scan_new_or_empty(), lazy_vacuum_heap_rel(), RecordFreeIndexPage(), RecordUsedIndexPage(), RelationAddBlocks(), RelationGetBufferForTuple(), and terminate_brin_buildstate().
void XLogRecordPageWithFreeSpace | ( | RelFileLocator | rlocator, |
BlockNumber | heapBlk, | ||
Size | spaceAvail | ||
) |
Definition at line 211 of file freespace.c.
References buf, BUFFER_LOCK_EXCLUSIVE, BufferGetPage(), FSM_FORKNUM, fsm_get_location(), fsm_logical_to_physical(), fsm_set_avail(), fsm_space_avail_to_cat(), InvalidBuffer, LockBuffer(), MarkBufferDirtyHint(), PageInit(), PageIsNew(), RBM_ZERO_ON_ERROR, UnlockReleaseBuffer(), and XLogReadBufferExtended().
Referenced by heap_xlog_insert(), heap_xlog_multi_insert(), heap_xlog_prune_freeze(), heap_xlog_update(), and heap_xlog_visible().