* Initialize metapage for bloom index. */
| 451 | * Initialize metapage for bloom index. |
| 452 | */ |
| 453 | void |
| 454 | BloomInitMetapage(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. |
no test coverage detected