get page lsn

This commit is contained in:
zoujia 2023-03-24 14:37:59 +08:00
parent 66055b3ec4
commit b020655fcb

View File

@ -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);