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 (RelFileNode rnode, 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 261 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(), RelationData::rd_smgr, RelationNeedsWAL, RelationOpenSmgr, smgrexists(), smgrnblocks(), START_CRIT_SECTION, UnlockReleaseBuffer(), and XLogHintBitIsNeeded.
Referenced by RelationTruncate(), and smgr_redo().
void FreeSpaceMapVacuum | ( | Relation | rel | ) |
Definition at line 333 of file freespace.c.
References fsm_vacuum_page(), and InvalidBlockNumber.
Referenced by brin_vacuum_scan(), and IndexFreeSpaceMapVacuum().
void FreeSpaceMapVacuumRange | ( | Relation | rel, |
BlockNumber | start, | ||
BlockNumber | end | ||
) |
Definition at line 352 of file freespace.c.
References fsm_vacuum_page().
Referenced by brin_doinsert(), brin_doupdate(), brin_getinsertbuffer(), lazy_scan_heap(), RelationAddExtraBlocks(), RelationTruncate(), smgr_redo(), and terminate_brin_buildstate().
BlockNumber GetPageWithFreeSpace | ( | Relation | rel, |
Size | spaceNeeded | ||
) |
Definition at line 132 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 230 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_heap(), pg_freespace(), and statapprox_heap().
BlockNumber RecordAndGetPageWithFreeSpace | ( | Relation | rel, |
BlockNumber | oldPage, | ||
Size | oldSpaceAvail, | ||
Size | spaceNeeded | ||
) |
Definition at line 149 of file freespace.c.
References 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 181 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_vacuum_heap(), RecordFreeIndexPage(), RecordUsedIndexPage(), RelationAddExtraBlocks(), and terminate_brin_buildstate().
void XLogRecordPageWithFreeSpace | ( | RelFileNode | rnode, |
BlockNumber | heapBlk, | ||
Size | spaceAvail | ||
) |
Definition at line 198 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(), LockBuffer(), MarkBufferDirtyHint(), PageInit(), PageIsNew, RBM_ZERO_ON_ERROR, UnlockReleaseBuffer(), and XLogReadBufferExtended().
Referenced by heap_xlog_clean(), heap_xlog_insert(), heap_xlog_multi_insert(), heap_xlog_update(), and heap_xlog_visible().