diff --git a/contrib/bloom/blinsert.c b/contrib/bloom/blinsert.c index bc5f6dc..ce096d8 100644 --- a/contrib/bloom/blinsert.c +++ b/contrib/bloom/blinsert.c @@ -179,8 +179,16 @@ blbuildempty(Relation index) * this even when wal_level=minimal. */ PageSetChecksumInplace(metapage, BLOOM_METAPAGE_BLKNO); + XLogRecPtr pageLSN = metapage[0] | + (metapage[1] << 8) | + (metapage[2] << 16) | + (metapage[3] << 24) | + (metapage[4] << 32) | + (metapage[5] << 40) | + (metapage[6] << 48) | + (metapage[7] << 56); smgrwrite(index->rd_smgr, INIT_FORKNUM, BLOOM_METAPAGE_BLKNO, - (char *) metapage, true,BlinsertLSN); + (char *) metapage, true, pageLSN); log_newpage(&index->rd_smgr->smgr_rnode.node, INIT_FORKNUM, BLOOM_METAPAGE_BLKNO, metapage, true);