This is an automated email from the ASF dual-hosted git repository. chenjinbao1989 pushed a commit to branch cbdb-postgres-merge in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/cbdb-postgres-merge by this push: new a79517361b5 Fix compile errors for access/bitmap a79517361b5 is described below commit a79517361b510d1c1348878486fa6d865c153005 Author: Jinbao Chen <chenjinbao1...@gmail.com> AuthorDate: Sun Sep 28 17:51:08 2025 +0800 Fix compile errors for access/bitmap --- src/backend/access/bitmap/bitmapattutil.c | 4 ++-- src/backend/access/bitmap/bitmapinsert.c | 14 +++++++------- src/backend/access/bitmap/bitmaputil.c | 12 ++++++------ src/backend/access/bitmap/bitmapxlog.c | 2 +- src/include/access/bitmap_xlog.h | 16 ++++++++-------- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/backend/access/bitmap/bitmapattutil.c b/src/backend/access/bitmap/bitmapattutil.c index a800341d9d5..b96b2414112 100644 --- a/src/backend/access/bitmap/bitmapattutil.c +++ b/src/backend/access/bitmap/bitmapattutil.c @@ -122,8 +122,8 @@ _bitmap_create_lov_heapandindex(Relation rel, lovHeap = heap_open(heapid, AccessExclusiveLock); lovIndex = index_open(idxid, AccessExclusiveLock); - RelationSetNewRelfilenode(lovHeap, lovHeap->rd_rel->relpersistence); - RelationSetNewRelfilenode(lovIndex, lovIndex->rd_rel->relpersistence); + RelationSetNewRelfilenumber(lovHeap, lovHeap->rd_rel->relpersistence); + RelationSetNewRelfilenumber(lovIndex, lovIndex->rd_rel->relpersistence); /* * After creating the new relfilenode for a btee index, this is not diff --git a/src/backend/access/bitmap/bitmapinsert.c b/src/backend/access/bitmap/bitmapinsert.c index 50e0054a4f2..8576dfcef6d 100644 --- a/src/backend/access/bitmap/bitmapinsert.c +++ b/src/backend/access/bitmap/bitmapinsert.c @@ -693,7 +693,7 @@ updatesetbit_inpage(Relation rel, uint64 tidnum, " in bitmap index %u" " (relfilenode %u/%u/%u, bitmap block %d, LOV block %d, LOV offset %d)", tidnum, RelationGetRelid(rel), - rel->rd_node.spcNode, rel->rd_node.dbNode, rel->rd_node.relNode, + rel->rd_locator.spcOid, rel->rd_locator.dbOid, rel->rd_locator.relNumber, BufferGetBlockNumber(bitmapBuffer), BufferGetBlockNumber(lovBuffer), lovOffset), errhint("Reindex bitmap index \"%s\".", RelationGetRelationName(rel)))); @@ -793,7 +793,7 @@ updatesetbit_inpage(Relation rel, uint64 tidnum, errmsg("incorrect header bit found in bitmap index %u; expected header bit 1" " (relfilenode %u/%u/%u, bitmap block %d, LOV block %d, LOV offset %d)", RelationGetRelid(rel), - rel->rd_node.spcNode, rel->rd_node.dbNode, rel->rd_node.relNode, + rel->rd_locator.spcOid, rel->rd_locator.spcOid, rel->rd_locator.spcOid, BufferGetBlockNumber(bitmapBuffer), BufferGetBlockNumber(lovBuffer), lovOffset))); @@ -913,7 +913,7 @@ updatesetbit_inpage(Relation rel, uint64 tidnum, errmsg("incorrect header bit found in bitmap index %u; expected header bit 1" " (relfilenode %u/%u/%u, bitmap block %d, LOV block %d, LOV offset %d)", RelationGetRelid(rel), - rel->rd_node.spcNode, rel->rd_node.dbNode, rel->rd_node.relNode, + rel->rd_locator.spcOid, rel->rd_locator.spcOid, rel->rd_locator.spcOid, BufferGetBlockNumber(bitmapBuffer), BufferGetBlockNumber(lovBuffer), lovOffset))); } @@ -1057,7 +1057,7 @@ findbitmappage(Relation rel, BMLOVItem lovitem, ", bm_last_word " INT64_FORMAT ", lov_words_header %d)", tidnum, RelationGetRelid(rel), - rel->rd_node.spcNode, rel->rd_node.dbNode, rel->rd_node.relNode, + rel->rd_locator.spcOid, rel->rd_locator.spcOid, rel->rd_locator.spcOid, nextBlockNo, lovitem->bm_lov_head, lovitem->bm_lov_tail, *firstTidNumberP, lovitem->bm_last_tid_location, lovitem->bm_last_setbit, lovitem->bm_last_compword, @@ -1105,7 +1105,7 @@ verify_bitmappages(Relation rel, BMLOVItem lovitem) " found for bitmap block %d in bitmap index %u (relfilenode %u/%u/%u);" " expected tid " INT64_FORMAT, bitmapOpaque->bm_last_tid_location, nextBlockNo, RelationGetRelid(rel), - rel->rd_node.spcNode, rel->rd_node.dbNode, rel->rd_node.relNode, tidnum); + rel->rd_locator.spcOid, rel->rd_locator.spcOid, rel->rd_locator.spcOid, tidnum); } nextBlockNo = bitmapOpaque->bm_bitmap_next; @@ -1316,7 +1316,7 @@ _bitmap_write_new_bitmapwords(Relation rel, elog(ERROR, "too many bitmap pages in one insert batch into bitmap index %u" " (relfilenode %u/%u/%u, LOV block %d, LOV offset %d)", RelationGetRelid(rel), - rel->rd_node.spcNode, rel->rd_node.dbNode, rel->rd_node.relNode, + rel->rd_locator.spcOid, rel->rd_locator.spcOid, rel->rd_locator.spcOid, BufferGetBlockNumber(lovBuffer), lovOffset); /* @@ -1687,7 +1687,7 @@ create_lovitem(Relation rel, Buffer metabuf, uint64 tidnum, errmsg("failed to add LOV item in bitmap index \"%s\"" " (relfilenode %u/%u/%u, LOV block %d, LOV offset %d)", RelationGetRelationName(rel), - rel->rd_node.spcNode, rel->rd_node.dbNode, rel->rd_node.relNode, + rel->rd_locator.spcOid, rel->rd_locator.spcOid, rel->rd_locator.spcOid, *lovBlockP, *lovOffsetP))); if(use_wal) diff --git a/src/backend/access/bitmap/bitmaputil.c b/src/backend/access/bitmap/bitmaputil.c index bb112abbc79..6fa4ca3b360 100644 --- a/src/backend/access/bitmap/bitmaputil.c +++ b/src/backend/access/bitmap/bitmaputil.c @@ -929,7 +929,7 @@ _bitmap_log_metapage(Relation rel, ForkNumber fork, Page page) xlMeta = (xl_bm_metapage *) palloc(MAXALIGN(sizeof(xl_bm_metapage))); - xlMeta->bm_node = rel->rd_node; + xlMeta->bm_node = rel->rd_locator; xlMeta->bm_fork = fork; xlMeta->bm_lov_heapId = metapage->bm_lov_heapId; xlMeta->bm_lov_indexId = metapage->bm_lov_indexId; @@ -954,7 +954,7 @@ _bitmap_log_bitmap_lastwords(Relation rel, Buffer lovBuffer, xl_bm_bitmap_lastwords xlLastwords; XLogRecPtr recptr; - xlLastwords.bm_node = rel->rd_node; + xlLastwords.bm_node = rel->rd_locator; xlLastwords.bm_last_compword = lovItem->bm_last_compword; xlLastwords.bm_last_word = lovItem->bm_last_word; xlLastwords.lov_words_header = lovItem->lov_words_header; @@ -993,7 +993,7 @@ _bitmap_log_lovitem(Relation rel, ForkNumber fork, Buffer lovBuffer, OffsetNumbe Assert(BufferGetBlockNumber(lovBuffer) > 0); - xlLovItem.bm_node = rel->rd_node; + xlLovItem.bm_node = rel->rd_locator; xlLovItem.bm_fork = fork; xlLovItem.bm_lov_blkno = BufferGetBlockNumber(lovBuffer); xlLovItem.bm_lov_offset = offset; @@ -1048,7 +1048,7 @@ _bitmap_log_bitmapwords(Relation rel, MemSet(&xlBitmapWords, 0, sizeof(xlBitmapWords)); - xlBitmapWords.bm_node = rel->rd_node; + xlBitmapWords.bm_node = rel->rd_locator; xlBitmapWords.bm_num_pages = num_bm_pages; xlBitmapWords.bm_init_first_page = init_first_page; @@ -1134,7 +1134,7 @@ _bitmap_log_updateword(Relation rel, Buffer bitmapBuffer, int word_no) bitmapPage = BufferGetPage(bitmapBuffer); bitmap = (BMBitmap) PageGetContentsMaxAligned(bitmapPage); - xlBitmapWord.bm_node = rel->rd_node; + xlBitmapWord.bm_node = rel->rd_locator; xlBitmapWord.bm_blkno = BufferGetBlockNumber(bitmapBuffer); xlBitmapWord.bm_word_no = word_no; xlBitmapWord.bm_cword = bitmap->cwords[word_no]; @@ -1215,7 +1215,7 @@ _bitmap_log_updatewords(Relation rel, xlBitmapWords.bm_next_blkno = secondOpaque->bm_bitmap_next; } - xlBitmapWords.bm_node = rel->rd_node; + xlBitmapWords.bm_node = rel->rd_locator; xlBitmapWords.bm_lov_blkno = BufferGetBlockNumber(lovBuffer); xlBitmapWords.bm_lov_offset = lovOffset; xlBitmapWords.bm_new_lastpage = new_lastpage; diff --git a/src/backend/access/bitmap/bitmapxlog.c b/src/backend/access/bitmap/bitmapxlog.c index 2ce9991a1b8..47e45c00f38 100644 --- a/src/backend/access/bitmap/bitmapxlog.c +++ b/src/backend/access/bitmap/bitmapxlog.c @@ -113,7 +113,7 @@ _bitmap_xlog_insert_meta(XLogRecPtr lsn, XLogReaderState *record) Page mp; BMMetaPage metapage; - metabuf = XLogReadBufferExtended(xlrec->bm_node, xlrec->bm_fork, BM_METAPAGE, RBM_ZERO_AND_LOCK); + metabuf = XLogReadBufferExtended(xlrec->bm_node, xlrec->bm_fork, BM_METAPAGE, RBM_ZERO_AND_LOCK, InvalidBuffer); Assert(BufferIsValid(metabuf)); mp = BufferGetPage(metabuf); diff --git a/src/include/access/bitmap_xlog.h b/src/include/access/bitmap_xlog.h index fc7e193ab9d..3e75cb09998 100644 --- a/src/include/access/bitmap_xlog.h +++ b/src/include/access/bitmap_xlog.h @@ -49,7 +49,7 @@ */ typedef struct xl_bm_bitmapwords { - RelFileNode bm_node; + RelFileLocator bm_node; int32 bm_num_pages; /* @@ -105,7 +105,7 @@ typedef struct xl_bm_bitmapwords_perpage typedef struct xl_bm_updatewords { - RelFileNode bm_node; + RelFileLocator bm_node; BlockNumber bm_lov_blkno; OffsetNumber bm_lov_offset; @@ -134,7 +134,7 @@ typedef struct xl_bm_updatewords typedef struct xl_bm_updateword { - RelFileNode bm_node; + RelFileLocator bm_node; BlockNumber bm_blkno; int bm_word_no; @@ -145,7 +145,7 @@ typedef struct xl_bm_updateword /* The information about inserting a new lovitem into the LOV list. */ typedef struct xl_bm_lovitem { - RelFileNode bm_node; + RelFileLocator bm_node; ForkNumber bm_fork; BlockNumber bm_lov_blkno; @@ -157,7 +157,7 @@ typedef struct xl_bm_lovitem /* The information about adding a new page */ typedef struct xl_bm_newpage { - RelFileNode bm_node; + RelFileLocator bm_node; BlockNumber bm_new_blkno; } xl_bm_newpage; @@ -167,7 +167,7 @@ typedef struct xl_bm_newpage */ typedef struct xl_bm_bitmappage { - RelFileNode bm_node; + RelFileLocator bm_node; BlockNumber bm_bitmap_blkno; @@ -185,7 +185,7 @@ typedef struct xl_bm_bitmappage /* The information about changes to the last 2 words in a bitmap vector */ typedef struct xl_bm_bitmap_lastwords { - RelFileNode bm_node; + RelFileLocator bm_node; BM_HRL_WORD bm_last_compword; BM_HRL_WORD bm_last_word; @@ -200,7 +200,7 @@ typedef struct xl_bm_bitmap_lastwords /* The information about the changes in the metapage. */ typedef struct xl_bm_metapage { - RelFileNode bm_node; + RelFileLocator bm_node; ForkNumber bm_fork; Oid bm_lov_heapId; /* the relation id for the heap */ Oid bm_lov_indexId; /* the relation id for the index */ --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cloudberry.apache.org For additional commands, e-mail: commits-h...@cloudberry.apache.org