diff options
Diffstat (limited to 'contrib/bloom/blinsert.c')
-rw-r--r-- | contrib/bloom/blinsert.c | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/contrib/bloom/blinsert.c b/contrib/bloom/blinsert.c index b42b9e6c41f..b90145148d4 100644 --- a/contrib/bloom/blinsert.c +++ b/contrib/bloom/blinsert.c @@ -129,7 +129,7 @@ blbuild(Relation heap, Relation index, IndexInfo *indexInfo) RelationGetRelationName(index)); /* Initialize the meta page */ - BloomInitMetapage(index); + BloomInitMetapage(index, MAIN_FORKNUM); /* Initialize the bloom build state */ memset(&buildstate, 0, sizeof(buildstate)); @@ -163,31 +163,8 @@ blbuild(Relation heap, Relation index, IndexInfo *indexInfo) void blbuildempty(Relation index) { - Page metapage; - - /* Construct metapage. */ - metapage = (Page) palloc_aligned(BLCKSZ, PG_IO_ALIGN_SIZE, 0); - BloomFillMetapage(index, metapage); - - /* - * Write the page and log it. It might seem that an immediate sync would - * be sufficient to guarantee that the file exists on disk, but recovery - * itself might remove it while replaying, for example, an - * XLOG_DBASE_CREATE* or XLOG_TBLSPC_CREATE record. Therefore, we need - * this even when wal_level=minimal. - */ - PageSetChecksumInplace(metapage, BLOOM_METAPAGE_BLKNO); - smgrwrite(RelationGetSmgr(index), INIT_FORKNUM, BLOOM_METAPAGE_BLKNO, - metapage, true); - log_newpage(&(RelationGetSmgr(index))->smgr_rlocator.locator, INIT_FORKNUM, - BLOOM_METAPAGE_BLKNO, metapage, true); - - /* - * An immediate sync is required even if we xlog'd the page, because the - * write did not go through shared_buffers and therefore a concurrent - * checkpoint may have moved the redo pointer past our xlog record. - */ - smgrimmedsync(RelationGetSmgr(index), INIT_FORKNUM); + /* Initialize the meta page */ + BloomInitMetapage(index, INIT_FORKNUM); } /* |