MCPcopy Create free account
hub / github.com/apache/cloudberry / _bitmap_log_bitmap_lastwords

Function _bitmap_log_bitmap_lastwords

src/backend/access/bitmap/bitmaputil.c:950–980  ·  view source on GitHub ↗

* _bitmap_log_bitmap_lastwords() -- log the last two words in a bitmap. */

Source from the content-addressed store, hash-verified

948 * _bitmap_log_bitmap_lastwords() -- log the last two words in a bitmap.
949 */
950void
951_bitmap_log_bitmap_lastwords(Relation rel, Buffer lovBuffer,
952 OffsetNumber lovOffset, BMLOVItem lovItem)
953{
954 xl_bm_bitmap_lastwords xlLastwords;
955 XLogRecPtr recptr;
956
957 xlLastwords.bm_node = rel->rd_node;
958 xlLastwords.bm_last_compword = lovItem->bm_last_compword;
959 xlLastwords.bm_last_word = lovItem->bm_last_word;
960 xlLastwords.lov_words_header = lovItem->lov_words_header;
961 xlLastwords.bm_last_setbit = lovItem->bm_last_setbit;
962 xlLastwords.bm_last_tid_location = lovItem->bm_last_tid_location;
963 xlLastwords.bm_lov_blkno = BufferGetBlockNumber(lovBuffer);
964 xlLastwords.bm_lov_offset = lovOffset;
965
966 XLogBeginInsert();
967 XLogRegisterData((char*)&xlLastwords, sizeof(xl_bm_bitmap_lastwords));
968 XLogRegisterBuffer(0, lovBuffer, REGBUF_STANDARD);
969
970 recptr = XLogInsert(RM_BITMAP_ID, XLOG_BITMAP_INSERT_BITMAP_LASTWORDS);
971
972 PageSetLSN(BufferGetPage(lovBuffer), recptr);
973
974 /*
975 * WAL consistency checking
976 */
977#ifdef DUMP_BITMAPAM_INSERT_RECORDS
978 _dump_page("insert", XactLastRecEnd, &rel->rd_node, lovBuffer);
979#endif
980}
981
982/*
983 * _bitmap_log_lovitem() -- log adding a new lov item to a lov page.

Callers 3

updatesetbitFunction · 0.85
insertsetbitFunction · 0.85

Calls 6

BufferGetBlockNumberFunction · 0.85
XLogBeginInsertFunction · 0.85
XLogRegisterDataFunction · 0.85
XLogRegisterBufferFunction · 0.85
XLogInsertFunction · 0.85
_dump_pageFunction · 0.85

Tested by

no test coverage detected