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

Function BloomInitMetapage

contrib/bloom/blutils.c:453–475  ·  view source on GitHub ↗

* Initialize metapage for bloom index. */

Source from the content-addressed store, hash-verified

451 * Initialize metapage for bloom index.
452 */
453void
454BloomInitMetapage(Relation index)
455{
456 Buffer metaBuffer;
457 Page metaPage;
458 GenericXLogState *state;
459
460 /*
461 * Make a new page; since it is first page it should be associated with
462 * block number 0 (BLOOM_METAPAGE_BLKNO).
463 */
464 metaBuffer = BloomNewBuffer(index);
465 Assert(BufferGetBlockNumber(metaBuffer) == BLOOM_METAPAGE_BLKNO);
466
467 /* Initialize contents of meta page */
468 state = GenericXLogStart(index);
469 metaPage = GenericXLogRegisterBuffer(state, metaBuffer,
470 GENERIC_XLOG_FULL_IMAGE);
471 BloomFillMetapage(index, metaPage);
472 GenericXLogFinish(state);
473
474 UnlockReleaseBuffer(metaBuffer);
475}
476
477/*
478 * Parse reloptions for bloom index, producing a BloomOptions struct.

Callers 1

blbuildFunction · 0.85

Calls 7

BloomNewBufferFunction · 0.85
BufferGetBlockNumberFunction · 0.85
GenericXLogStartFunction · 0.85
BloomFillMetapageFunction · 0.85
GenericXLogFinishFunction · 0.85
UnlockReleaseBufferFunction · 0.85

Tested by

no test coverage detected