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 f68f71b4dea Enable regression test
f68f71b4dea is described below

commit f68f71b4dea26cb9dbf38723b61d6b310cd845c9
Author: Jinbao Chen <[email protected]>
AuthorDate: Fri Oct 24 10:43:06 2025 +0800

    Enable regression test
---
 GNUmakefile.in                   |  4 +--
 contrib/pageinspect/bmfuncs.c    |  2 +-
 contrib/pageinspect/brinfuncs.c  | 26 ---------------
 contrib/pageinspect/btreefuncs.c | 68 ----------------------------------------
 contrib/pageinspect/ginfuncs.c   |  8 -----
 contrib/pageinspect/gistfuncs.c  | 21 ++-----------
 contrib/pageinspect/hashfuncs.c  |  4 ---
 contrib/pageinspect/rawpage.c    | 13 --------
 src/test/regress/GNUmakefile     |  2 +-
 src/test/regress/pg_regress.c    | 10 +++---
 10 files changed, 11 insertions(+), 147 deletions(-)

diff --git a/GNUmakefile.in b/GNUmakefile.in
index 3a8f2d56188..956bb8bd305 100644
--- a/GNUmakefile.in
+++ b/GNUmakefile.in
@@ -21,7 +21,7 @@ all:
 #      $(MAKE) -C contrib/dblink all
 #      $(MAKE) -C contrib/indexscan all
        $(MAKE) -C contrib/interconnect all
-#      $(MAKE) -C contrib/pageinspect all  # needed by src/test/isolation
+       $(MAKE) -C contrib/pageinspect all  # needed by src/test/isolation
 #      $(MAKE) -C contrib/hstore all
 #      $(MAKE) -C contrib/pgcrypto all
 #      $(MAKE) -C contrib/btree_gin all
@@ -68,7 +68,7 @@ install:
 #      $(MAKE) -C contrib/dblink $@
 #      $(MAKE) -C contrib/indexscan $@
        $(MAKE) -C contrib/interconnect $@
-#      $(MAKE) -C contrib/pageinspect $@  # needed by src/test/isolation
+       $(MAKE) -C contrib/pageinspect $@  # needed by src/test/isolation
 #      $(MAKE) -C contrib/hstore $@
 #      $(MAKE) -C contrib/pgcrypto $@
 #      $(MAKE) -C contrib/btree_gin $@
diff --git a/contrib/pageinspect/bmfuncs.c b/contrib/pageinspect/bmfuncs.c
index 43861400418..a13f1f6dd68 100644
--- a/contrib/pageinspect/bmfuncs.c
+++ b/contrib/pageinspect/bmfuncs.c
@@ -7,7 +7,7 @@
 #include "postgres.h"
 
 #include "pageinspect.h"
-
+#include <arpa/inet.h>
 #include "access/bitmap_private.h"
 #include "access/relation.h"
 #include "catalog/namespace.h"
diff --git a/contrib/pageinspect/brinfuncs.c b/contrib/pageinspect/brinfuncs.c
index 3c01480d4dc..89273f24356 100644
--- a/contrib/pageinspect/brinfuncs.c
+++ b/contrib/pageinspect/brinfuncs.c
@@ -34,12 +34,9 @@ PG_FUNCTION_INFO_V1(brin_page_items);
 PG_FUNCTION_INFO_V1(brin_metapage_info);
 PG_FUNCTION_INFO_V1(brin_revmap_data);
 
-<<<<<<< HEAD
 /* GPDB specific */
 PG_FUNCTION_INFO_V1(brin_revmap_chain);
 
-=======
->>>>>>> REL_16_9
 #define IS_BRIN(r) ((r)->rd_rel->relam == BRIN_AM_OID)
 
 typedef struct brin_column_state
@@ -71,21 +68,12 @@ brin_page_type(PG_FUNCTION_ARGS)
 
        /* verify the special space has the expected size */
        if (PageGetSpecialSize(page) != MAXALIGN(sizeof(BrinSpecialSpace)))
-<<<<<<< HEAD
-                       ereport(ERROR,
-                                       
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                                        errmsg("input page is not a valid %s 
page", "BRIN"),
-                                        errdetail("Expected special size %d, 
got %d.",
-                                                          (int) 
MAXALIGN(sizeof(BrinSpecialSpace)),
-                                                          (int) 
PageGetSpecialSize(page))));
-=======
                ereport(ERROR,
                                (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
                                 errmsg("input page is not a valid %s page", 
"BRIN"),
                                 errdetail("Expected special size %d, got %d.",
                                                   (int) 
MAXALIGN(sizeof(BrinSpecialSpace)),
                                                   (int) 
PageGetSpecialSize(page))));
->>>>>>> REL_16_9
 
        switch (BrinPageType(page))
        {
@@ -120,21 +108,12 @@ verify_brin_page(bytea *raw_page, uint16 type, const char 
*strtype)
 
        /* verify the special space has the expected size */
        if (PageGetSpecialSize(page) != MAXALIGN(sizeof(BrinSpecialSpace)))
-<<<<<<< HEAD
-                       ereport(ERROR,
-                                       
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                                        errmsg("input page is not a valid %s 
page", "BRIN"),
-                                        errdetail("Expected special size %d, 
got %d.",
-                                                          (int) 
MAXALIGN(sizeof(BrinSpecialSpace)),
-                                                          (int) 
PageGetSpecialSize(page))));
-=======
                ereport(ERROR,
                                (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
                                 errmsg("input page is not a valid %s page", 
"BRIN"),
                                 errdetail("Expected special size %d, got %d.",
                                                   (int) 
MAXALIGN(sizeof(BrinSpecialSpace)),
                                                   (int) 
PageGetSpecialSize(page))));
->>>>>>> REL_16_9
 
        /* verify the special space says this page is what we want */
        if (BrinPageType(page) != type)
@@ -359,16 +338,11 @@ brin_metapage_info(PG_FUNCTION_ARGS)
        Page            page;
        BrinMetaPageData *meta;
        TupleDesc       tupdesc;
-<<<<<<< HEAD
        Datum           values[8];
        bool            nulls[8];
        Datum      *firstrevmappages;
        Datum      *lastrevmappages;
        Datum      *lastrevmappagenums;
-=======
-       Datum           values[4];
-       bool            nulls[4] = {0};
->>>>>>> REL_16_9
        HeapTuple       htup;
 
        if (!superuser())
diff --git a/contrib/pageinspect/btreefuncs.c b/contrib/pageinspect/btreefuncs.c
index 6a34beed54e..9cdc8e182b4 100644
--- a/contrib/pageinspect/btreefuncs.c
+++ b/contrib/pageinspect/btreefuncs.c
@@ -280,37 +280,7 @@ bt_page_stats_internal(PG_FUNCTION_ARGS, enum 
pageinspect_version ext_version)
        relrv = makeRangeVarFromNameList(textToQualifiedNameList(relname));
        rel = relation_openrv(relrv, AccessShareLock);
 
-<<<<<<< HEAD
-       if (!IS_INDEX(rel) || !IS_BTREE(rel))
-               ereport(ERROR,
-                               (errcode(ERRCODE_WRONG_OBJECT_TYPE),
-                                errmsg("\"%s\" is not a %s index",
-                                               RelationGetRelationName(rel), 
"btree")));
-
-       /*
-        * Reject attempts to read non-local temporary relations; we would be
-        * likely to get wrong data since we have no visibility into the owning
-        * session's local buffers.
-        */
-       if (RELATION_IS_OTHER_TEMP(rel))
-               ereport(ERROR,
-                               (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                                errmsg("cannot access temporary tables of 
other sessions")));
-
-       if (blkno < 0 || blkno > MaxBlockNumber)
-               ereport(ERROR,
-                               (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                                errmsg("invalid block number")));
-
-       if (blkno == 0)
-               ereport(ERROR,
-                               (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                                errmsg("block 0 is a meta page")));
-
-       CHECK_RELATION_BLOCK_RANGE(rel, blkno);
-=======
        bt_index_block_validate(rel, blkno);
->>>>>>> REL_16_9
 
        buffer = ReadBuffer(rel, blkno);
        LockBuffer(buffer, BUFFER_LOCK_SHARE);
@@ -679,37 +649,7 @@ bt_page_items_internal(PG_FUNCTION_ARGS, enum 
pageinspect_version ext_version)
                relrv = 
makeRangeVarFromNameList(textToQualifiedNameList(relname));
                rel = relation_openrv(relrv, AccessShareLock);
 
-<<<<<<< HEAD
-               if (!IS_INDEX(rel) || !IS_BTREE(rel))
-                       ereport(ERROR,
-                                       (errcode(ERRCODE_WRONG_OBJECT_TYPE),
-                                        errmsg("\"%s\" is not a %s index",
-                                                       
RelationGetRelationName(rel), "btree")));
-
-               /*
-                * Reject attempts to read non-local temporary relations; we 
would be
-                * likely to get wrong data since we have no visibility into the
-                * owning session's local buffers.
-                */
-               if (RELATION_IS_OTHER_TEMP(rel))
-                       ereport(ERROR,
-                                       (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                                        errmsg("cannot access temporary tables 
of other sessions")));
-
-               if (blkno < 0 || blkno > MaxBlockNumber)
-                       ereport(ERROR,
-                                       
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                                        errmsg("invalid block number")));
-
-               if (blkno == 0)
-                       ereport(ERROR,
-                                       
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                                        errmsg("block 0 is a meta page")));
-
-               CHECK_RELATION_BLOCK_RANGE(rel, blkno);
-=======
                bt_index_block_validate(rel, blkno);
->>>>>>> REL_16_9
 
                buffer = ReadBuffer(rel, blkno);
                LockBuffer(buffer, BUFFER_LOCK_SHARE);
@@ -797,11 +737,7 @@ bt_page_items_bytea(PG_FUNCTION_ARGS)
        bytea      *raw_page = PG_GETARG_BYTEA_P(0);
        Datum           result;
        FuncCallContext *fctx;
-<<<<<<< HEAD
-       struct user_args *uargs;
-=======
        ua_page_items *uargs;
->>>>>>> REL_16_9
 
        if (!superuser())
                ereport(ERROR,
@@ -838,11 +774,7 @@ bt_page_items_bytea(PG_FUNCTION_ARGS)
                                                           (int) 
MAXALIGN(sizeof(BTPageOpaqueData)),
                                                           (int) 
PageGetSpecialSize(uargs->page))));
 
-<<<<<<< HEAD
-               opaque = (BTPageOpaque) PageGetSpecialPointer(uargs->page);
-=======
                opaque = BTPageGetOpaque(uargs->page);
->>>>>>> REL_16_9
 
                if (P_ISMETA(opaque))
                        ereport(ERROR,
diff --git a/contrib/pageinspect/ginfuncs.c b/contrib/pageinspect/ginfuncs.c
index 0cc368caa79..0f846988dff 100644
--- a/contrib/pageinspect/ginfuncs.c
+++ b/contrib/pageinspect/ginfuncs.c
@@ -57,12 +57,8 @@ gin_metapage_info(PG_FUNCTION_ARGS)
                                                   (int) 
MAXALIGN(sizeof(GinPageOpaqueData)),
                                                   (int) 
PageGetSpecialSize(page))));
 
-<<<<<<< HEAD
-       opaq = (GinPageOpaque) PageGetSpecialPointer(page);
-=======
        opaq = GinPageGetOpaque(page);
 
->>>>>>> REL_16_9
        if (opaq->flags != GIN_META)
                ereport(ERROR,
                                (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
@@ -131,11 +127,7 @@ gin_page_opaque_info(PG_FUNCTION_ARGS)
                                                   (int) 
MAXALIGN(sizeof(GinPageOpaqueData)),
                                                   (int) 
PageGetSpecialSize(page))));
 
-<<<<<<< HEAD
-       opaq = (GinPageOpaque) PageGetSpecialPointer(page);
-=======
        opaq = GinPageGetOpaque(page);
->>>>>>> REL_16_9
 
        /* Build a tuple descriptor for our result type */
        if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE)
diff --git a/contrib/pageinspect/gistfuncs.c b/contrib/pageinspect/gistfuncs.c
index 6ac1b18f87a..1c4c7f3faa3 100644
--- a/contrib/pageinspect/gistfuncs.c
+++ b/contrib/pageinspect/gistfuncs.c
@@ -32,11 +32,6 @@ PG_FUNCTION_INFO_V1(gist_page_items);
 PG_FUNCTION_INFO_V1(gist_page_items_bytea);
 
 #define IS_GIST(r) ((r)->rd_rel->relam == GIST_AM_OID)
-<<<<<<< HEAD
-
-#define ItemPointerGetDatum(X)  PointerGetDatum(X)
-=======
->>>>>>> REL_16_9
 
 
 static Page verify_gist_page(bytea *raw_page);
@@ -81,6 +76,7 @@ gist_page_opaque_info(PG_FUNCTION_ARGS)
        bytea      *raw_page = PG_GETARG_BYTEA_P(0);
        TupleDesc       tupdesc;
        Page            page;
+       GISTPageOpaque opaq;
        HeapTuple       resultTuple;
        Datum           values[4];
        bool            nulls[4];
@@ -97,7 +93,6 @@ gist_page_opaque_info(PG_FUNCTION_ARGS)
 
        if (PageIsNew(page))
                PG_RETURN_NULL();
-<<<<<<< HEAD
 
        /* verify the special space has the expected size */
        if (PageGetSpecialSize(page) != MAXALIGN(sizeof(GISTPageOpaqueData)))
@@ -116,8 +111,6 @@ gist_page_opaque_info(PG_FUNCTION_ARGS)
                                         errdetail("Expected %08x, got %08x.",
                                                           GIST_PAGE_ID,
                                                           
opaq->gist_page_id)));
-=======
->>>>>>> REL_16_9
 
        /* Build a tuple descriptor for our result type */
        if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE)
@@ -272,10 +265,7 @@ gist_page_items(PG_FUNCTION_ARGS)
                                 errmsg("\"%s\" is not a %s index",
                                                
RelationGetRelationName(indexRel), "GiST")));
 
-<<<<<<< HEAD
        page = get_page_from_raw(raw_page);
-=======
-       page = verify_gist_page(raw_page);
 
        if (PageIsNew(page))
        {
@@ -303,13 +293,6 @@ gist_page_items(PG_FUNCTION_ARGS)
 
        index_columns = pg_get_indexdef_columns_extended(indexRelid,
                                                                                
                         printflags);
->>>>>>> REL_16_9
-
-       if (PageIsNew(page))
-       {
-               index_close(indexRel, AccessShareLock);
-               PG_RETURN_NULL();
-       }
 
        /* Avoid bogus PageGetMaxOffsetNumber() call with deleted pages */
        if (GistPageIsDeleted(page))
@@ -337,7 +320,7 @@ gist_page_items(PG_FUNCTION_ARGS)
 
                itup = (IndexTuple) PageGetItem(page, id);
 
-               index_deform_tuple(itup, tupdesc,
+               index_deform_tuple(itup, RelationGetDescr(indexRel),
                                                   itup_values, itup_isnull);
 
                memset(nulls, 0, sizeof(nulls));
diff --git a/contrib/pageinspect/hashfuncs.c b/contrib/pageinspect/hashfuncs.c
index 57adf1cba5c..92e1e6abf44 100644
--- a/contrib/pageinspect/hashfuncs.c
+++ b/contrib/pageinspect/hashfuncs.c
@@ -417,11 +417,7 @@ hash_bitmap_info(PG_FUNCTION_ARGS)
 
        indexRel = relation_open(indexRelid, AccessShareLock);
 
-<<<<<<< HEAD
        if (!IS_HASH(indexRel))
-=======
-       if (!IS_INDEX(indexRel) || !IS_HASH(indexRel))
->>>>>>> REL_16_9
                ereport(ERROR,
                                (errcode(ERRCODE_WRONG_OBJECT_TYPE),
                                 errmsg("\"%s\" is not a %s index",
diff --git a/contrib/pageinspect/rawpage.c b/contrib/pageinspect/rawpage.c
index b25eb7e495e..218d22a2075 100644
--- a/contrib/pageinspect/rawpage.c
+++ b/contrib/pageinspect/rawpage.c
@@ -270,12 +270,8 @@ page_header(PG_FUNCTION_ARGS)
                                (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
                                 errmsg("must be superuser to use raw page 
functions")));
 
-<<<<<<< HEAD
-       page = (PageHeader) get_page_from_raw(raw_page);
-=======
        page = get_page_from_raw(raw_page);
        pageheader = (PageHeader) page;
->>>>>>> REL_16_9
 
        /* Build a tuple descriptor for our result type */
        if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE)
@@ -295,14 +291,6 @@ page_header(PG_FUNCTION_ARGS)
        }
        else
                values[0] = LSNGetDatum(lsn);
-<<<<<<< HEAD
-       values[1] = UInt16GetDatum(page->pd_checksum);
-       values[2] = UInt16GetDatum(page->pd_flags);
-       values[3] = UInt16GetDatum(page->pd_lower);
-       values[4] = UInt16GetDatum(page->pd_upper);
-       values[5] = UInt16GetDatum(page->pd_special);
-       values[6] = UInt32GetDatum(PageGetPageSize(page));
-=======
        values[1] = UInt16GetDatum(pageheader->pd_checksum);
        values[2] = UInt16GetDatum(pageheader->pd_flags);
 
@@ -332,7 +320,6 @@ page_header(PG_FUNCTION_ARGS)
                        break;
        }
 
->>>>>>> REL_16_9
        values[7] = UInt16GetDatum(PageGetPageLayoutVersion(page));
        values[8] = TransactionIdGetDatum(pageheader->pd_prune_xid);
 
diff --git a/src/test/regress/GNUmakefile b/src/test/regress/GNUmakefile
index ff4bc2bbe11..fc003d3024a 100644
--- a/src/test/regress/GNUmakefile
+++ b/src/test/regress/GNUmakefile
@@ -208,7 +208,7 @@ installcheck-parallel: all
 # cbdb parallel plan tests, ignore the incompatible cases, should run with 5 
GUCs like below:
 installcheck-cbdb-parallel: all tablespace-setup twophase_pqexecparams
        ( \
-       export PGOPTIONS='-c optimizer=off -c enable_parallel=true -c 
min_parallel_table_scan_size=0 -c min_parallel_index_scan_size=0 -c 
force_parallel_mode=1'; \
+       export PGOPTIONS='-c optimizer=off -c enable_parallel=true -c 
min_parallel_table_scan_size=0 -c min_parallel_index_scan_size=0'; \
        $(pg_regress_installcheck) $(REGRESS_OPTS) 
--schedule=$(srcdir)/parallel_schedule --schedule=$(srcdir)/greenplum_schedule 
--max-connections=5 $(EXTRA_TESTS) --exclude-tests explain \
        )
 
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c
index e57b40c4763..b0d4da4cdb3 100644
--- a/src/test/regress/pg_regress.c
+++ b/src/test/regress/pg_regress.c
@@ -2541,8 +2541,8 @@ run_single_test(const char *test, test_start_function 
startfunc,
                           *tl;
        bool            differ = false;
 
-       if (!cluster_healthy())
-               return;
+//     if (!cluster_healthy())
+//             return;
 
        if (should_exclude_test((char *) test))
                return;
@@ -3495,9 +3495,9 @@ regression_main(int argc, char *argv[],
             "Single node (no segments) mode enabled. Replace '@hostname@' by 
hostname of contentid = -1",
             "Normal cluster detected. Replace '@hostname@' by hostname of 
contentid = 0");
 
-       force_parallel_enabled = check_feature_status("force_parallel_mode", 
"on",
-                       "Force parallel mode enabled. Result diffs will ignore 
plans.",
-                       "Force parallel mode disabled. Using default answer 
files");
+//     force_parallel_enabled = check_feature_status("force_parallel_mode", 
"on",
+//                     "Force parallel mode enabled. Result diffs will ignore 
plans.",
+//                     "Force parallel mode disabled. Using default answer 
files");
 
        convert_sourcefiles();
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to