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

Function GetBitmapIndexAuxOids

src/backend/access/bitmap/bitmap.c:1098–1120  ·  view source on GitHub ↗

* GetBitmapIndexAuxOids - Given an open index, fetch and return the oids for * the bitmap subobjects (pg_bm_xxxx + pg_bm_xxxx_index). * * Note: Currently this information is not stored directly in the catalog, but * is hidden away inside the metadata page of the index. Future versions should * move this information into the catalog. */

Source from the content-addressed store, hash-verified

1096 * move this information into the catalog.
1097 */
1098void
1099GetBitmapIndexAuxOids(Relation index, Oid *heapId, Oid *indexId)
1100{
1101 Buffer metabuf;
1102 BMMetaPage metapage;
1103
1104
1105 /* Only Bitmap Indexes have bitmap related sub-objects */
1106 if (!RelationIsBitmapIndex(index))
1107 {
1108 *heapId = InvalidOid;
1109 *indexId = InvalidOid;
1110 return;
1111 }
1112
1113 metabuf = _bitmap_getbuf(index, BM_METAPAGE, BM_READ);
1114 metapage = _bitmap_get_metapage_data(index, metabuf);
1115
1116 *heapId = metapage->bm_lov_heapId;
1117 *indexId = metapage->bm_lov_indexId;
1118
1119 _bitmap_relbuf(metabuf);
1120}
1121
1122bytea *
1123bmoptions(Datum reloptions, bool validate)

Callers 2

ATExecSetTableSpaceFunction · 0.85
_bitmap_initFunction · 0.85

Calls 3

_bitmap_getbufFunction · 0.85
_bitmap_relbufFunction · 0.85

Tested by

no test coverage detected