PostgreSQL Source Code
git master
|
#include "access/brin_revmap.h"
Go to the source code of this file.
Functions | |
bool | brin_doupdate (Relation idxrel, BlockNumber pagesPerRange, BrinRevmap *revmap, BlockNumber heapBlk, Buffer oldbuf, OffsetNumber oldoff, const BrinTuple *origtup, Size origsz, const BrinTuple *newtup, Size newsz, bool samepage) |
bool | brin_can_do_samepage_update (Buffer buffer, Size origsz, Size newsz) |
OffsetNumber | brin_doinsert (Relation idxrel, BlockNumber pagesPerRange, BrinRevmap *revmap, Buffer *buffer, BlockNumber heapBlk, BrinTuple *tup, Size itemsz) |
void | brin_page_init (Page page, uint16 type) |
void | brin_metapage_init (Page page, BlockNumber pagesPerRange, uint16 version) |
bool | brin_start_evacuating_page (Relation idxRel, Buffer buf) |
void | brin_evacuate_page (Relation idxRel, BlockNumber pagesPerRange, BrinRevmap *revmap, Buffer buf) |
void | brin_page_cleanup (Relation idxrel, Buffer buf) |
Definition at line 323 of file brin_pageops.c.
References BufferGetPage(), and PageGetExactFreeSpace().
Referenced by brin_doupdate(), brininsert(), and summarize_range().
OffsetNumber brin_doinsert | ( | Relation | idxrel, |
BlockNumber | pagesPerRange, | ||
BrinRevmap * | revmap, | ||
Buffer * | buffer, | ||
BlockNumber | heapBlk, | ||
BrinTuple * | tup, | ||
Size | itemsz | ||
) |
Definition at line 342 of file brin_pageops.c.
References Assert, br_page_get_freespace(), BRIN_elog, brin_getinsertbuffer(), brin_page_init(), BRIN_PAGETYPE_REGULAR, brinLockRevmapPageForUpdate(), BrinMaxItemSize, brinRevmapExtend(), brinSetHeapBlockItemptr(), BUFFER_LOCK_EXCLUSIVE, BUFFER_LOCK_UNLOCK, BufferGetBlockNumber(), BufferGetPage(), BufferIsValid(), DEBUG2, elog, END_CRIT_SECTION, ereport, errcode(), errmsg(), ERROR, FreeSpaceMapVacuumRange(), xl_brin_insert::heapBlk, InvalidBuffer, InvalidOffsetNumber, ItemPointerSet(), LockBuffer(), MarkBufferDirty(), MAXALIGN, xl_brin_insert::offnum, PageAddItem, PageSetLSN(), xl_brin_insert::pagesPerRange, RecordPageWithFreeSpace(), REGBUF_STANDARD, REGBUF_WILL_INIT, RelationGetRelationName, RelationNeedsWAL, SizeOfBrinInsert, START_CRIT_SECTION, UnlockReleaseBuffer(), XLOG_BRIN_INIT_PAGE, XLOG_BRIN_INSERT, XLogBeginInsert(), XLogInsert(), XLogRegisterBufData(), XLogRegisterBuffer(), and XLogRegisterData().
Referenced by _brin_parallel_merge(), brin_fill_empty_ranges(), form_and_insert_tuple(), and summarize_range().
bool brin_doupdate | ( | Relation | idxrel, |
BlockNumber | pagesPerRange, | ||
BrinRevmap * | revmap, | ||
BlockNumber | heapBlk, | ||
Buffer | oldbuf, | ||
OffsetNumber | oldoff, | ||
const BrinTuple * | origtup, | ||
Size | origsz, | ||
const BrinTuple * | newtup, | ||
Size | newsz, | ||
bool | samepage | ||
) |
Definition at line 53 of file brin_pageops.c.
References Assert, br_page_get_freespace(), brin_can_do_samepage_update(), BRIN_EVACUATE_PAGE, brin_getinsertbuffer(), brin_initialize_empty_new_buffer(), BRIN_IS_REGULAR_PAGE, brin_page_init(), BRIN_PAGETYPE_REGULAR, brin_tuples_equal(), brinLockRevmapPageForUpdate(), BrinMaxItemSize, BrinPageFlags, brinRevmapExtend(), brinSetHeapBlockItemptr(), BUFFER_LOCK_EXCLUSIVE, BUFFER_LOCK_UNLOCK, BufferGetBlockNumber(), BufferGetPage(), BufferIsValid(), elog, END_CRIT_SECTION, ereport, errcode(), errmsg(), ERROR, FreeSpaceMapVacuumRange(), xl_brin_insert::heapBlk, xl_brin_update::insert, InvalidBlockNumber, InvalidBuffer, InvalidOffsetNumber, ItemIdGetLength, ItemIdIsNormal, ItemPointerSet(), LockBuffer(), MarkBufferDirty(), MAXALIGN, xl_brin_insert::offnum, xl_brin_samepage_update::offnum, xl_brin_update::oldOffnum, PageAddItem, PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), PageIndexTupleDeleteNoCompact(), PageIndexTupleOverwrite(), PageSetLSN(), xl_brin_insert::pagesPerRange, RecordPageWithFreeSpace(), REGBUF_STANDARD, REGBUF_WILL_INIT, RelationGetRelationName, RelationNeedsWAL, SizeOfBrinSamepageUpdate, SizeOfBrinUpdate, START_CRIT_SECTION, unconstify, UnlockReleaseBuffer(), XLOG_BRIN_INIT_PAGE, XLOG_BRIN_SAMEPAGE_UPDATE, XLOG_BRIN_UPDATE, XLogBeginInsert(), XLogInsert(), XLogRegisterBufData(), XLogRegisterBuffer(), and XLogRegisterData().
Referenced by brin_evacuate_page(), brininsert(), and summarize_range().
void brin_evacuate_page | ( | Relation | idxRel, |
BlockNumber | pagesPerRange, | ||
BrinRevmap * | revmap, | ||
Buffer | buf | ||
) |
Definition at line 564 of file brin_pageops.c.
References Assert, brin_copy_tuple(), brin_doupdate(), BRIN_EVACUATE_PAGE, BRIN_IS_REGULAR_PAGE, BrinPageFlags, BrinTuple::bt_blkno, buf, BUFFER_LOCK_SHARE, BUFFER_LOCK_UNLOCK, BufferGetPage(), CHECK_FOR_INTERRUPTS, FirstOffsetNumber, ItemIdGetLength, ItemIdIsUsed, LockBuffer(), PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), and UnlockReleaseBuffer().
Referenced by revmap_physical_extend().
void brin_metapage_init | ( | Page | page, |
BlockNumber | pagesPerRange, | ||
uint16 | version | ||
) |
Definition at line 486 of file brin_pageops.c.
References BRIN_META_MAGIC, brin_page_init(), BRIN_PAGETYPE_META, BrinMetaPageData::brinMagic, BrinMetaPageData::brinVersion, BrinMetaPageData::lastRevmapPage, PageGetContents(), and BrinMetaPageData::pagesPerRange.
Referenced by brin_xlog_createidx(), brinbuild(), and brinbuildempty().
Definition at line 624 of file brin_pageops.c.
References br_page_get_freespace(), brin_initialize_empty_new_buffer(), BRIN_IS_META_PAGE, BRIN_IS_REVMAP_PAGE, buf, BUFFER_LOCK_EXCLUSIVE, BUFFER_LOCK_UNLOCK, BufferGetBlockNumber(), BufferGetPage(), LockBuffer(), LockRelationForExtension(), PageIsNew(), RecordPageWithFreeSpace(), ShareLock, and UnlockRelationForExtension().
Referenced by brin_vacuum_scan().
Definition at line 475 of file brin_pageops.c.
References BrinPageType, PageInit(), and type.
Referenced by brin_doinsert(), brin_doupdate(), brin_initialize_empty_new_buffer(), brin_metapage_init(), brin_xlog_insert_update(), brin_xlog_revmap_extend(), and revmap_physical_extend().
Definition at line 524 of file brin_pageops.c.
References BRIN_EVACUATE_PAGE, BrinPageFlags, buf, BufferGetPage(), FirstOffsetNumber, ItemIdIsUsed, MarkBufferDirtyHint(), PageGetItemId(), PageGetMaxOffsetNumber(), and PageIsNew().
Referenced by revmap_physical_extend().