From 44d0e973ac01b30a985e903073b60c26692285fb Mon Sep 17 00:00:00 2001 From: liushengsong Date: Fri, 13 Mar 2026 14:44:55 +0800 Subject: [PATCH 1/6] Fix: test parallel_schedule with greenplum_schedule --- .github/workflows/pg16-merge-validation.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pg16-merge-validation.yml b/.github/workflows/pg16-merge-validation.yml index c2f093f3de4..fc245c3eb6c 100644 --- a/.github/workflows/pg16-merge-validation.yml +++ b/.github/workflows/pg16-merge-validation.yml @@ -111,12 +111,8 @@ jobs: # Uncomment and add tests as features become available ALL_TESTS='{ "include": [ - {"test":"ic-small-opt-off", - "make_configs":["src/test/regress:installcheck-small"], - "pg_settings":{"optimizer":"off"} - }, - {"test":"ic-greenplum-schedule", - "make_configs":["src/test/regress:installcheck-cbdb"], + {"test":"ic-good-opt-off", + "make_configs":["src/test/regress:installcheck-good"], "pg_settings":{"optimizer":"off"} }, {"test":"ic-isolation2-basic", From 7bff980b6fd1decbc985cb4226cb3915d06ee4cd Mon Sep 17 00:00:00 2001 From: liushengsong Date: Fri, 13 Mar 2026 16:50:11 +0800 Subject: [PATCH 2/6] fix: fix configure params --- .github/workflows/pg16-merge-validation.yml | 32 ++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/pg16-merge-validation.yml b/.github/workflows/pg16-merge-validation.yml index fc245c3eb6c..080a124574c 100644 --- a/.github/workflows/pg16-merge-validation.yml +++ b/.github/workflows/pg16-merge-validation.yml @@ -294,7 +294,7 @@ jobs: echo "- Install Prefix: ${INSTALL_PREFIX}" echo "- Port: 5432" echo "- Debug: Enabled (O0, g3, cassert)" - echo "- Disabled Features: ORCA, GPCloud, GPFdist, zstd" + echo "- Disabled Features: GPCloud" } >> "$GITHUB_STEP_SUMMARY" - name: Prepare Installation Directory @@ -340,8 +340,8 @@ jobs: echo " --enable-cassert" echo " --enable-debug-extensions" echo " --with-perl --with-python --with-libxml --with-openssl" - echo " --without-zstd" - echo " --disable-gpcloud --disable-orca --disable-gpfdist" + echo " --with-zstd" + echo " --disable-gpcloud" echo " --with-pythonsrc-ext" echo " --with-gssapi" echo "" @@ -349,7 +349,7 @@ jobs: # Run configure as gpadmin if ! su - gpadmin -c " cd ${SRC_DIR} - export LD_LIBRARY_PATH=${INSTALL_PREFIX}/lib:\${LD_LIBRARY_PATH} + export LD_LIBRARY_PATH=${INSTALL_PREFIX}/lib:${LD_LIBRARY_PATH} CFLAGS='-O0 -g3' ./configure \ --prefix=${INSTALL_PREFIX} \ --with-pgport=5432 \ @@ -358,14 +358,14 @@ jobs: --with-python \ --with-libxml \ --with-openssl \ - --without-zstd \ + --with-zstd \ --enable-debug-extensions \ --disable-gpcloud \ - --disable-orca \ - --disable-gpfdist \ --with-pythonsrc-ext \ --with-gssapi \ - --without-icu + --without-icu \ + --with-libraries=${INSTALL_PREFIX}/lib \ + --with-includes=/usr/local/xerces-c/include "; then echo "::error::Configure failed" exit 1 @@ -388,9 +388,9 @@ jobs: # Build and install as gpadmin (non-parallel to avoid issues) if ! time su - gpadmin -c " cd ${SRC_DIR} - export LD_LIBRARY_PATH=${INSTALL_PREFIX}/lib:\${LD_LIBRARY_PATH} - make - make install + export LD_LIBRARY_PATH=${INSTALL_PREFIX}/lib:${LD_LIBRARY_PATH} + make -j$(nproc) + make -j$(nproc) install "; then echo "::error::Build and installation failed" exit 1 @@ -624,7 +624,7 @@ jobs: # We don't need to build, just configure su - gpadmin -c " cd ${SRC_DIR} - export LD_LIBRARY_PATH=${INSTALL_PREFIX}/lib:\${LD_LIBRARY_PATH} + export LD_LIBRARY_PATH=${INSTALL_PREFIX}/lib:${LD_LIBRARY_PATH} CFLAGS='-O0 -g3' ./configure \ --prefix=${INSTALL_PREFIX} \ --with-pgport=5432 \ @@ -633,14 +633,14 @@ jobs: --with-python \ --with-libxml \ --with-openssl \ - --without-zstd \ + --with-zstd \ --enable-debug-extensions \ --disable-gpcloud \ - --disable-orca \ - --disable-gpfdist \ --with-pythonsrc-ext \ --with-gssapi \ - --without-icu + --without-icu \ + --with-libraries=${INSTALL_PREFIX}/lib \ + --with-includes=/usr/local/xerces-c/include " 2>&1 | tee -a ${LOGS_DIR}/details/configure.log - name: Create gpdemo Cluster From 62c788c20327adaff087b12517c85ab163981cd0 Mon Sep 17 00:00:00 2001 From: liushengsong Date: Mon, 16 Mar 2026 11:34:46 +0800 Subject: [PATCH 3/6] fix greenplumn schedule --- src/backend/utils/activity/pgstat.c | 7 +- src/test/regress/expected/autostats.out | 4 +- src/test/regress/expected/explain.out | 1 + src/test/regress/expected/external_table.out | 86 ++++++++++--------- src/test/regress/expected/gp_tablespace.out | 20 +++-- src/test/regress/expected/profile.out | 2 +- src/test/regress/expected/stats.out | 8 +- src/test/regress/input/uao_dml/uao_dml.source | 4 +- .../regress/output/uao_dml/uao_dml.source | 12 +-- src/test/regress/sql/external_table.sql | 4 + src/test/regress/sql/gp_tablespace.sql | 4 + 11 files changed, 87 insertions(+), 65 deletions(-) diff --git a/src/backend/utils/activity/pgstat.c b/src/backend/utils/activity/pgstat.c index 926800c9c09..a43dcb75398 100644 --- a/src/backend/utils/activity/pgstat.c +++ b/src/backend/utils/activity/pgstat.c @@ -1772,6 +1772,7 @@ assign_stats_fetch_consistency(int newval, void *extra) void pgstat_send_qd_tabstats(void) { + int nest_level; PgStat_SubXactStatus *xact_state; StringInfoData buf; PgStatTabRecordFromQE *records; @@ -1788,10 +1789,14 @@ pgstat_send_qd_tabstats(void) * current nesting level's per-table insert/update/delete counts. */ xact_state = pgstat_get_current_xact_stack(); - if (xact_state == NULL) return; + nest_level = GetCurrentTransactionNestLevel(); + + if (nest_level != xact_state->nest_level) + return; + records = (PgStatTabRecordFromQE *) palloc(capacity * sizeof(PgStatTabRecordFromQE)); diff --git a/src/test/regress/expected/autostats.out b/src/test/regress/expected/autostats.out index 2705b8e70cd..c0390066c39 100644 --- a/src/test/regress/expected/autostats.out +++ b/src/test/regress/expected/autostats.out @@ -45,8 +45,8 @@ set role=autostats_nonowner; LOG: statement: set role=autostats_nonowner; insert into autostats_test select generate_series(1, 10); LOG: statement: insert into autostats_test select generate_series(1, 10); -LOG: An exception was encountered during the execution of statement: insert into autostats_test select generate_series(1, 10); ERROR: permission denied for table autostats_test +LOG: An exception was encountered during the execution of statement: insert into autostats_test select generate_series(1, 10); select relname, reltuples from pg_class where relname='autostats_test'; LOG: statement: select relname, reltuples from pg_class where relname='autostats_test'; relname | reltuples @@ -87,8 +87,8 @@ LOG: statement: select relname, reltuples from pg_class where relname='autostat -- Try to disable allow_nonowner GUC as ordinary user, should fail set gp_autostats_allow_nonowner=off; LOG: statement: set gp_autostats_allow_nonowner=off; -LOG: An exception was encountered during the execution of statement: set gp_autostats_allow_nonowner=off; ERROR: permission denied to set parameter "gp_autostats_allow_nonowner" +LOG: An exception was encountered during the execution of statement: set gp_autostats_allow_nonowner=off; show gp_autostats_allow_nonowner; LOG: statement: show gp_autostats_allow_nonowner; gp_autostats_allow_nonowner diff --git a/src/test/regress/expected/explain.out b/src/test/regress/expected/explain.out index 078bf02c12b..eecddd6e407 100644 --- a/src/test/regress/expected/explain.out +++ b/src/test/regress/expected/explain.out @@ -759,6 +759,7 @@ select jsonb_pretty( "Settings": { + "jit": "off", + "Optimizer": "Postgres query optimizer", + + "optimizer": "off", + "enable_parallel": "off", + "parallel_setup_cost": "0", + "parallel_tuple_cost": "0", + diff --git a/src/test/regress/expected/external_table.out b/src/test/regress/expected/external_table.out index 38fbb3458de..d102e2b0c77 100644 --- a/src/test/regress/expected/external_table.out +++ b/src/test/regress/expected/external_table.out @@ -23,6 +23,10 @@ -- m/DETAIL: Found \d+ URLs and \d+ primary segments./ -- s/Found.+// -- +-- # normalize absolute source paths across environments (also handles file:// URIs) +-- m|/.+/src/test/regress/| +-- s|/.+/src/test/regress/|/ABSPATH/src/test/regress/| +-- -- end_matchsubs \getenv abs_srcdir PG_ABS_SRCDIR \getenv hostname PG_HOSTNAME @@ -323,9 +327,9 @@ create external table badt1 (x text) location (:'badt1_file' ) format 'text' (delimiter '|'); select * from badt1; -NOTICE: gfile stat /home/gpadmin/cloudberry/src/test/regress/data/no/such/place/badt1.tbl failure: No such file or directory (seg0 slice1 127.0.1.1:7002 pid=26072) -NOTICE: fstream unable to open file /home/gpadmin/cloudberry/src/test/regress/data/no/such/place/badt1.tbl (seg0 slice1 127.0.1.1:7002 pid=26072) -ERROR: could not open file "/home/gpadmin/cloudberry/src/test/regress/data/no/such/place/badt1.tbl": 404 file not found (seg0 slice1 127.0.1.1:7002 pid=26072) +NOTICE: gfile stat /ABSPATH/src/test/regress/data/no/such/place/badt1.tbl failure: No such file or directory (seg0 slice1 127.0.1.1:7002 pid=26072) +NOTICE: fstream unable to open file /ABSPATH/src/test/regress/data/no/such/place/badt1.tbl (seg0 slice1 127.0.1.1:7002 pid=26072) +ERROR: could not open file "/ABSPATH/src/test/regress/data/no/such/place/badt1.tbl": 404 file not found (seg0 slice1 127.0.1.1:7002 pid=26072) drop external table badt1; -- -- try a bad protocol @@ -818,7 +822,7 @@ LOG ERRORS SEGMENT REJECT LIMIT 2; SELECT * FROM exttab_basic_3; ERROR: segment reject limit reached, aborting operation (seg0 slice1 127.0.1.1:7002 pid=26072) DETAIL: Last error was: invalid input syntax for type integer: "error_1", column i -CONTEXT: External table exttab_basic_3, line 7 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data, column i +CONTEXT: External table exttab_basic_3, line 7 of file:/ABSPATH/src/test/regress/data/exttab_more_errors.data, column i -- Error log should be populated select count(*) > 0 from gp_read_error_log('exttab_basic_3'); ?column? @@ -850,7 +854,7 @@ LOG ERRORS SEGMENT REJECT LIMIT 5; INSERT INTO exttab_insert_1 select * from exttab_basic_5; ERROR: segment reject limit reached, aborting operation (seg0 127.0.1.1:7002 pid=26072) DETAIL: Last error was: invalid input syntax for type integer: "error_1", column i -CONTEXT: External table exttab_basic_5, line 18 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data, column i +CONTEXT: External table exttab_basic_5, line 18 of file:/ABSPATH/src/test/regress/data/exttab_more_errors.data, column i SELECT * from exttab_insert_1 order by i; i | j ----+----------- @@ -921,7 +925,7 @@ NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column(s) named 'i' HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew. ERROR: segment reject limit reached, aborting operation (seg0 slice1 127.0.1.1:7002 pid=26167) DETAIL: Last error was: invalid input syntax for type integer: "error_1", column i -CONTEXT: External table exttab_basic_7, line 18 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data, column i +CONTEXT: External table exttab_basic_7, line 18 of file:/ABSPATH/src/test/regress/data/exttab_more_errors.data, column i -- Table should not exist SELECT * from exttab_ctas_2 order by i; ERROR: relation "exttab_ctas_2" does not exist @@ -1011,7 +1015,7 @@ WHERE e1.i = e2.i ORDER BY e1.i SELECT * FROM cte1 ORDER BY cte1.i; ERROR: segment reject limit reached, aborting operation (seg0 slice2 127.0.1.1:7002 pid=26190) DETAIL: Last error was: invalid input syntax for type integer: "error_1", column i -CONTEXT: External table exttab_cte_2, line 7 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data, column i +CONTEXT: External table exttab_cte_2, line 7 of file:/ABSPATH/src/test/regress/data/exttab_more_errors.data, column i select count(*) from gp_read_error_log('exttab_cte_2'); count ------- @@ -1022,8 +1026,8 @@ select count(*) from gp_read_error_log('exttab_cte_2'); select gp_read_error_log('exttab_cte_2'); gp_read_error_log ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - ("Fri Jan 02 07:40:32.618206 2026 PST",exttab_cte_2,"file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data [/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data]",5,,"invalid input syntax for type integer: ""error_1"", column i",error_1,) - ("Fri Jan 02 07:40:32.618206 2026 PST",exttab_cte_2,"file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data [/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data]",7,,"invalid input syntax for type integer: ""error_1"", column i",error_1,) + ("Fri Jan 02 07:40:32.618206 2026 PST",exttab_cte_2,"file:/ABSPATH/src/test/regress/data/exttab_more_errors.data [/ABSPATH/src/test/regress/data/exttab_more_errors.data]",5,,"invalid input syntax for type integer: ""error_1"", column i",error_1,) + ("Fri Jan 02 07:40:32.618206 2026 PST",exttab_cte_2,"file:/ABSPATH/src/test/regress/data/exttab_more_errors.data [/ABSPATH/src/test/regress/data/exttab_more_errors.data]",7,,"invalid input syntax for type integer: ""error_1"", column i",error_1,) (2 rows) -- end_ignore @@ -1075,7 +1079,7 @@ NOTICE: found 2 data formatting errors (2 or more input rows), rejected related SELECT COUNT(*) FROM exttab_permissions_2; ERROR: segment reject limit reached, aborting operation (seg0 slice1 127.0.1.1:7002 pid=26072) DETAIL: Last error was: invalid input syntax for type integer: "error_1", column i -CONTEXT: External table exttab_permissions_2, line 7 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data, column i +CONTEXT: External table exttab_permissions_2, line 7 of file:/ABSPATH/src/test/regress/data/exttab_more_errors.data, column i -- Only superuser can do gp_truncate_error_log('*.*') DROP ROLE IF EXISTS exttab_non_superuser; NOTICE: role "exttab_non_superuser" does not exist, skipping @@ -1290,7 +1294,7 @@ SELECT sum(distinct e1.i), sum(distinct e2.i), e1.j FROM group by e1.j; ERROR: segment reject limit reached, aborting operation (seg0 slice3 127.0.1.1:7002 pid=26262) DETAIL: Last error was: invalid input syntax for type integer: "error_1", column i -CONTEXT: External table exttab_subq_2, line 7 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data, column i +CONTEXT: External table exttab_subq_2, line 7 of file:/ABSPATH/src/test/regress/data/exttab_more_errors.data, column i SELECT COUNT(*) > 0 FROM ( SELECT * FROM gp_read_error_log('exttab_subq_1') @@ -1321,7 +1325,7 @@ group by e1.j HAVING sum(distinct e1.i) > (SELECT max(i) FROM exttab_subq_2); ERROR: segment reject limit reached, aborting operation (seg0 slice5 127.0.1.1:7002 pid=26235) DETAIL: Last error was: invalid input syntax for type integer: "error_1", column i -CONTEXT: External table exttab_subq_2, line 7 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data, column i +CONTEXT: External table exttab_subq_2, line 7 of file:/ABSPATH/src/test/regress/data/exttab_more_errors.data, column i SELECT COUNT(*) > 0 FROM ( SELECT * FROM gp_read_error_log('exttab_subq_1') @@ -1418,7 +1422,7 @@ FROM exttab_subq_2 e1, exttab_subq_1 e2 WHERE e1.i = e2.i; ERROR: segment reject limit reached, aborting operation (seg0 slice1 127.0.1.1:7002 pid=26235) DETAIL: Last error was: invalid input syntax for type integer: "error_1", column i -CONTEXT: External table exttab_subq_2, line 7 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data, column i +CONTEXT: External table exttab_subq_2, line 7 of file:/ABSPATH/src/test/regress/data/exttab_more_errors.data, column i -- CSQ SELECT gp_truncate_error_log('exttab_subq_1'); gp_truncate_error_log @@ -1438,7 +1442,7 @@ WHERE e1.j = e2.j and e1.i + 1 IN ( SELECT i from exttab_subq_2 WHERE i <= e1.i); ERROR: segment reject limit reached, aborting operation (seg0 slice3 127.0.1.1:7002 pid=26262) DETAIL: Last error was: invalid input syntax for type integer: "error_1", column i -CONTEXT: External table exttab_subq_2, line 7 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data, column i +CONTEXT: External table exttab_subq_2, line 7 of file:/ABSPATH/src/test/regress/data/exttab_more_errors.data, column i SELECT COUNT(*) > 0 FROM ( SELECT * FROM gp_read_error_log('exttab_subq_1') @@ -1467,7 +1471,7 @@ FROM exttab_subq_2 e1, exttab_subq_1 e2 WHERE e1.i = e2.i; ERROR: segment reject limit reached, aborting operation (seg0 slice1 127.0.1.1:7002 pid=26235) DETAIL: Last error was: invalid input syntax for type integer: "error_1", column i -CONTEXT: External table exttab_subq_2, line 7 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data, column i +CONTEXT: External table exttab_subq_2, line 7 of file:/ABSPATH/src/test/regress/data/exttab_more_errors.data, column i SELECT COUNT(*) > 0 FROM ( SELECT * FROM gp_read_error_log('exttab_subq_1') @@ -1597,7 +1601,7 @@ SELECT e1.i, e2.j FROM WHERE e1.i = e2.i; ERROR: segment reject limit reached, aborting operation (seg0 slice1 127.0.1.1:7002 pid=26235) DETAIL: Last error was: invalid input syntax for type integer: "error_1", column i -CONTEXT: External table exttab_subtxs_2, line 7 of file://gpadmin:/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data, column i +CONTEXT: External table exttab_subtxs_2, line 7 of file:/ABSPATH/src/test/regress/data/exttab_more_errors.data, column i COMMIT; -- Error logs should not have been rolled back. -- Check that number of errors is greater than 12 instead of checking for @@ -1734,7 +1738,7 @@ SELECT e1.i, e2.j FROM WHERE e1.i = e2.i; ERROR: segment reject limit reached, aborting operation (seg0 slice1 127.0.1.1:7002 pid=26235) DETAIL: Last error was: invalid input syntax for type integer: "error_1", column i -CONTEXT: External table exttab_txs_2, line 7 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data, column i +CONTEXT: External table exttab_txs_2, line 7 of file:/ABSPATH/src/test/regress/data/exttab_more_errors.data, column i COMMIT; -- Additional error rows should have been inserted into the error logs even if the tx is aborted. -- Truncate of error logs should not be rolled back even if the transaction is aborted. All operation on error logs are persisted. @@ -1806,7 +1810,7 @@ SELECT e1.i, e2.j FROM WHERE e1.i = e2.i order by e1.i; ERROR: segment reject limit reached, aborting operation (seg0 slice2 127.0.1.1:7002 pid=26343) DETAIL: Last error was: invalid input syntax for type integer: "error_1", column i -CONTEXT: External table exttab_txs_3, line 7 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data, column i +CONTEXT: External table exttab_txs_3, line 7 of file:/ABSPATH/src/test/regress/data/exttab_more_errors.data, column i COMMIT; -- Error logs should not exist for these tables that would have been rolled back SELECT count(*) FROM gp_read_error_log('exttab_txs_3'); @@ -1855,7 +1859,7 @@ LANGUAGE plpgsql volatile; SELECT * FROM exttab_udfs_func1(); ERROR: segment reject limit reached, aborting operation (seg0 slice3 127.0.1.1:7002 pid=26362) DETAIL: Last error was: invalid input syntax for type integer: "error_1", column i -CONTEXT: External table exttab_udfs_2, line 7 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data, column i +CONTEXT: External table exttab_udfs_2, line 7 of file:/ABSPATH/src/test/regress/data/exttab_more_errors.data, column i SQL statement "SELECT sum(distinct e1.i) as sum_i, sum(distinct e2.i) as sum_j, e1.j as j FROM (SELECT i, j FROM exttab_udfs_1 WHERE i < 5 ) e1, (SELECT i, j FROM exttab_udfs_2 WHERE i < 10) e2 @@ -1895,7 +1899,7 @@ SELECT gp_truncate_error_log('exttab_udfs_2'); INSERT INTO exttab_udfs_insert_1 SELECT * FROM exttab_udfs_func1(); ERROR: segment reject limit reached, aborting operation (seg0 slice3 127.0.1.1:7002 pid=26389) DETAIL: Last error was: invalid input syntax for type integer: "error_1", column i -CONTEXT: External table exttab_udfs_2, line 7 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data, column i +CONTEXT: External table exttab_udfs_2, line 7 of file:/ABSPATH/src/test/regress/data/exttab_more_errors.data, column i SQL statement "SELECT sum(distinct e1.i) as sum_i, sum(distinct e2.i) as sum_j, e1.j as j FROM (SELECT i, j FROM exttab_udfs_1 WHERE i < 5 ) e1, (SELECT i, j FROM exttab_udfs_2 WHERE i < 10) e2 @@ -1981,7 +1985,7 @@ SELECT * FROM exttab_udfs_func2(); NOTICE: found 2 data formatting errors (2 or more input rows), rejected related input data ERROR: segment reject limit reached, aborting operation (seg0 127.0.1.1:7002 pid=26235) DETAIL: Last error was: invalid input syntax for type integer: "error_1", column i -CONTEXT: External table exttab_udfs_2, line 7 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data, column i +CONTEXT: External table exttab_udfs_2, line 7 of file:/ABSPATH/src/test/regress/data/exttab_more_errors.data, column i SELECT COUNT(*) > 0 FROM ( SELECT * FROM gp_read_error_log('exttab_udfs_1') @@ -2009,7 +2013,7 @@ SELECT exttab_udfs_func2(); NOTICE: found 2 data formatting errors (2 or more input rows), rejected related input data ERROR: segment reject limit reached, aborting operation (seg0 127.0.1.1:7002 pid=26235) DETAIL: Last error was: invalid input syntax for type integer: "error_1", column i -CONTEXT: External table exttab_udfs_2, line 7 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data, column i +CONTEXT: External table exttab_udfs_2, line 7 of file:/ABSPATH/src/test/regress/data/exttab_more_errors.data, column i SELECT COUNT(*) > 0 FROM ( SELECT * FROM gp_read_error_log('exttab_udfs_1') @@ -2037,7 +2041,7 @@ INSERT INTO exttab_udfs_insert_1 SELECT * FROM exttab_udfs_func2(); NOTICE: found 2 data formatting errors (2 or more input rows), rejected related input data ERROR: segment reject limit reached, aborting operation (seg0 127.0.1.1:7002 pid=26235) DETAIL: Last error was: invalid input syntax for type integer: "error_1", column i -CONTEXT: External table exttab_udfs_2, line 7 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data, column i +CONTEXT: External table exttab_udfs_2, line 7 of file:/ABSPATH/src/test/regress/data/exttab_more_errors.data, column i SELECT COUNT(*) > 0 FROM ( SELECT * FROM gp_read_error_log('exttab_udfs_1') @@ -2067,7 +2071,7 @@ HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sur NOTICE: found 2 data formatting errors (2 or more input rows), rejected related input data ERROR: segment reject limit reached, aborting operation (seg0 127.0.1.1:7002 pid=26235) DETAIL: Last error was: invalid input syntax for type integer: "error_1", column i -CONTEXT: External table exttab_udfs_2, line 7 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data, column i +CONTEXT: External table exttab_udfs_2, line 7 of file:/ABSPATH/src/test/regress/data/exttab_more_errors.data, column i SELECT COUNT(*) > 0 FROM ( SELECT * FROM gp_read_error_log('exttab_udfs_1') @@ -2108,7 +2112,7 @@ SELECT * FROM exttab_union_2 order by FOO.i; ERROR: segment reject limit reached, aborting operation (seg0 slice2 127.0.1.1:7002 pid=26423) DETAIL: Last error was: invalid input syntax for type integer: "error_1", column i -CONTEXT: External table exttab_union_2, line 7 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data, column i +CONTEXT: External table exttab_union_2, line 7 of file:/ABSPATH/src/test/regress/data/exttab_more_errors.data, column i -- Error table count select count(*) > 0 from ( @@ -2144,7 +2148,7 @@ UNION ALL SELECT e1.i, e2.j from exttab_union_2 e1 INNER JOIN exttab_union_2 e2 ON e1.i = e2.i; ERROR: segment reject limit reached, aborting operation (seg0 slice2 127.0.1.1:7002 pid=26444) DETAIL: Last error was: invalid input syntax for type integer: "error_1", column i -CONTEXT: External table exttab_union_2, line 7 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data, column i +CONTEXT: External table exttab_union_2, line 7 of file:/ABSPATH/src/test/regress/data/exttab_more_errors.data, column i -- should return 0 rows SELECT * from exttab_union_insert_1; i | j @@ -2231,7 +2235,7 @@ SELECT gp_truncate_error_log('exttab_views_2'); SELECT * FROM exttab_views_3; ERROR: segment reject limit reached, aborting operation (seg0 slice3 127.0.1.1:7002 pid=26462) DETAIL: Last error was: invalid input syntax for type integer: "error_1", column i -CONTEXT: External table exttab_views_2, line 7 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data, column i +CONTEXT: External table exttab_views_2, line 7 of file:/ABSPATH/src/test/regress/data/exttab_more_errors.data, column i -- Error table should be populated SELECT count(*) > 0 FROM ( @@ -2266,7 +2270,7 @@ SELECT gp_truncate_error_log('exttab_views_2'); INSERT INTO exttab_views_insert_1 SELECT * FROM exttab_views_3; ERROR: segment reject limit reached, aborting operation (seg0 slice3 127.0.1.1:7002 pid=26496) DETAIL: Last error was: invalid input syntax for type integer: "error_1", column i -CONTEXT: External table exttab_views_2, line 7 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data, column i +CONTEXT: External table exttab_views_2, line 7 of file:/ABSPATH/src/test/regress/data/exttab_more_errors.data, column i -- should not have any rows SELECT * FROM exttab_views_insert_1; i | j | k @@ -2306,7 +2310,7 @@ NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column(s) named 'j' HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew. ERROR: segment reject limit reached, aborting operation (seg0 slice2 127.0.1.1:7002 pid=26490) DETAIL: Last error was: invalid input syntax for type integer: "error_1", column i -CONTEXT: External table exttab_views_2, line 7 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data, column i +CONTEXT: External table exttab_views_2, line 7 of file:/ABSPATH/src/test/regress/data/exttab_more_errors.data, column i SELECT * FROM exttab_views_ctas_1; ERROR: relation "exttab_views_ctas_1" does not exist LINE 1: SELECT * FROM exttab_views_ctas_1; @@ -2344,7 +2348,7 @@ NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column(s) named 'j' HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew. ERROR: segment reject limit reached, aborting operation (seg0 slice2 127.0.1.1:7002 pid=26490) DETAIL: Last error was: invalid input syntax for type integer: "error_1", column i -CONTEXT: External table exttab_views_2, line 7 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data, column i +CONTEXT: External table exttab_views_2, line 7 of file:/ABSPATH/src/test/regress/data/exttab_more_errors.data, column i -- Relation should not exist SELECT * FROM exttab_views_ctas_1; ERROR: relation "exttab_views_ctas_1" does not exist @@ -2459,7 +2463,7 @@ ORDER BY c1.i limit 5; ERROR: segment reject limit reached, aborting operation (seg0 slice9 127.0.1.1:7002 pid=26587) DETAIL: Last error was: invalid input syntax for type integer: "error_1", column i -CONTEXT: External table exttab_windows_2, line 7 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data, column i +CONTEXT: External table exttab_windows_2, line 7 of file:/ABSPATH/src/test/regress/data/exttab_more_errors.data, column i SELECT COUNT(*) > 0 FROM ( @@ -2494,7 +2498,7 @@ WHERE e1.i = e2.i LIMIT 5 SELECT * FROM cte1, exttab_limit_2 e3 where cte1.i = e3.i ORDER BY cte1.i LIMIT 3; ERROR: segment reject limit reached, aborting operation (seg0 slice1 127.0.1.1:7002 pid=26235) DETAIL: Last error was: invalid input syntax for type integer: "error_1", column i -CONTEXT: External table exttab_limit_2, line 7 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data, column i +CONTEXT: External table exttab_limit_2, line 7 of file:/ABSPATH/src/test/regress/data/exttab_more_errors.data, column i SELECT count(*) FROM gp_read_error_log('exttab_limit_2'); count ------- @@ -2570,7 +2574,7 @@ WHERE e1.i = e2.i LIMIT 3 SELECT * FROM cte1, exttab_limit_2 e3 where cte1.i = e3.i ORDER BY cte1.i LIMIT 5; ERROR: segment reject limit reached, aborting operation (seg0 slice1 127.0.1.1:7002 pid=26235) DETAIL: Last error was: invalid input syntax for type integer: "error_1", column i -CONTEXT: External table exttab_limit_2, line 7 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data, column i +CONTEXT: External table exttab_limit_2, line 7 of file:/ABSPATH/src/test/regress/data/exttab_more_errors.data, column i SELECT count(*) > 0 FROM gp_read_error_log('exttab_limit_2'); ?column? ---------- @@ -2645,7 +2649,7 @@ SELECT gp_truncate_error_log('exttab_limit_2'); SELECT * FROM exttab_limit_1 e1, exttab_limit_2 e2 where e1.i = e2.i LIMIT 3; ERROR: segment reject limit reached, aborting operation (seg0 slice3 127.0.1.1:7002 pid=26670) DETAIL: Last error was: invalid input syntax for type integer: "error_1", column i -CONTEXT: External table exttab_limit_2, line 7 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_more_errors.data, column i +CONTEXT: External table exttab_limit_2, line 7 of file:/ABSPATH/src/test/regress/data/exttab_more_errors.data, column i SELECT count(*) > 0 FROM ( SELECT * FROM gp_read_error_log('exttab_limit_1') @@ -2678,7 +2682,7 @@ LOG ERRORS SEGMENT REJECT LIMIT 20000; SELECT COUNT(*) FROM exttab_first_reject_limit_1; ERROR: all 1000 first rows in this segment were rejected (seg0 slice1 127.0.1.1:7002 pid=26235) DETAIL: Aborting operation regardless of REJECT LIMIT value, last error was: invalid input syntax for type integer: "error_0", column i -CONTEXT: External table exttab_first_reject_limit_1, line 1000 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_first_errors.data, column i +CONTEXT: External table exttab_first_reject_limit_1, line 1000 of file:/ABSPATH/src/test/regress/data/exttab_first_errors.data, column i SELECT COUNT(*) > 0 FROM gp_read_error_log('exttab_first_reject_limit_1'); ?column? ---------- @@ -2717,7 +2721,7 @@ SET gp_initial_bad_row_limit = 2; SELECT COUNT(*) FROM exttab_first_reject_limit_2; ERROR: all 2 first rows in this segment were rejected (seg0 slice1 127.0.1.1:7002 pid=26235) DETAIL: Aborting operation regardless of REJECT LIMIT value, last error was: invalid input syntax for type integer: "error_0", column i -CONTEXT: External table exttab_first_reject_limit_2, line 2 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_first_errors.data, column i +CONTEXT: External table exttab_first_reject_limit_2, line 2 of file:/ABSPATH/src/test/regress/data/exttab_first_errors.data, column i SELECT COUNT(*) > 0 from gp_read_error_log('exttab_first_reject_limit_2'); ?column? ---------- @@ -2735,7 +2739,7 @@ SELECT gp_truncate_error_log('exttab_first_reject_limit_2'); SELECT COUNT(*) FROM exttab_first_reject_limit_2; ERROR: segment reject limit reached, aborting operation (seg0 slice1 127.0.1.1:7002 pid=26235) DETAIL: Last error was: invalid input syntax for type integer: "error_0", column i -CONTEXT: External table exttab_first_reject_limit_2, line 500 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_first_errors.data, column i +CONTEXT: External table exttab_first_reject_limit_2, line 500 of file:/ABSPATH/src/test/regress/data/exttab_first_errors.data, column i SELECT COUNT(*) > 0 from gp_read_error_log('exttab_first_reject_limit_2'); ?column? ---------- @@ -2753,7 +2757,7 @@ SELECT gp_truncate_error_log('exttab_first_reject_limit_2'); SELECT COUNT(*) FROM exttab_first_reject_limit_2; ERROR: segment reject limit reached, aborting operation (seg0 slice1 127.0.1.1:7002 pid=26235) DETAIL: Last error was: invalid input syntax for type integer: "error_0", column i -CONTEXT: External table exttab_first_reject_limit_2, line 500 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_first_errors.data, column i +CONTEXT: External table exttab_first_reject_limit_2, line 500 of file:/ABSPATH/src/test/regress/data/exttab_first_errors.data, column i SELECT COUNT(*) > 0 from gp_read_error_log('exttab_first_reject_limit_2'); ?column? ---------- @@ -2822,7 +2826,7 @@ OPTIONS (hello 'world', bonjour 'again', nihao 'again and again' ); --------+---------+-----------+----------+---------+------------- i | integer | | | | j | text | | | | -FDW options: (format 'text', delimiter '|', "null" E'\\N', escape E'\\', hello 'world', bonjour 'again', nihao 'again and again', format_type 't', location_uris 'file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_few_errors.data', execute_on 'ALL_SEGMENTS', log_errors 'f', encoding '6', is_writable 'false') +FDW options: (format 'text', delimiter '|', "null" E'\\N', escape E'\\', hello 'world', bonjour 'again', nihao 'again and again', format_type 't', location_uris 'file:/ABSPATH/src/test/regress/data/exttab_few_errors.data', execute_on 'ALL_SEGMENTS', log_errors 'f', encoding '6', is_writable 'false') \d exttab_with_option_empty Foreign table "public.exttab_with_option_empty" @@ -2830,7 +2834,7 @@ FDW options: (format 'text', delimiter '|', "null" E'\\N', escape E'\\', hello ' --------+---------+-----------+----------+---------+------------- i | integer | | | | j | text | | | | -FDW options: (format 'text', delimiter '|', "null" E'\\N', escape E'\\', format_type 't', location_uris 'file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab_few_errors.data', execute_on 'ALL_SEGMENTS', log_errors 'f', encoding '6', is_writable 'false') +FDW options: (format 'text', delimiter '|', "null" E'\\N', escape E'\\', format_type 't', location_uris 'file:/ABSPATH/src/test/regress/data/exttab_few_errors.data', execute_on 'ALL_SEGMENTS', log_errors 'f', encoding '6', is_writable 'false') DROP EXTERNAL TABLE IF EXISTS exttab_with_option_empty; DROP EXTERNAL TABLE IF EXISTS exttab_with_option_1; @@ -2998,7 +3002,7 @@ LANGUAGE plpgSQL READS SQL DATA; SET gp_log_gang TO DEBUG; SELECT * FROM exttab_error_context_callback_func(); ERROR: invalid input syntax for type integer: "1|1_number" (seg0 slice1 127.0.1.1:7002 pid=26824) -CONTEXT: External table exttab_error_context_callback, line 1 of file://gpadmin/home/gpadmin/cloudberry/src/test/regress/data/exttab.data, column c1 +CONTEXT: External table exttab_error_context_callback, line 1 of file:/ABSPATH/src/test/regress/data/exttab.data, column c1 PL/pgSQL function exttab_error_context_callback_func() line 5 at FOR over SELECT rows SET gp_log_gang TO DEFAULT; DROP FUNCTION exttab_error_context_callback_func(); diff --git a/src/test/regress/expected/gp_tablespace.out b/src/test/regress/expected/gp_tablespace.out index 0f4267bbed9..fa53640fa14 100644 --- a/src/test/regress/expected/gp_tablespace.out +++ b/src/test/regress/expected/gp_tablespace.out @@ -1,3 +1,7 @@ +-- start_matchsubs +-- m|/.*/testtablespace_existing_version_dir/| +-- s|/.*/testtablespace_existing_version_dir/|/ABSPATH/testtablespace_existing_version_dir/| +-- end_matchsubs -- start_matchignore -- m/WARNING: tablespace symlink path is too long for TAR/ -- m/DETAIL: The symlinked path \".*\" will be truncated to 100 characters when sending a TAR to the utilities \(e.g. pg_basebackup\)/ @@ -416,28 +420,28 @@ SELECT force_mirrors_to_catch_up(); (1 row) \! ls $PG_ABS_SRCDIR/testtablespace_existing_version_dir/* -/home/gpadmin/cloudberry/src/test/regress/testtablespace_existing_version_dir/1: +/ABSPATH/testtablespace_existing_version_dir/1: GPDB_99_399999991 -/home/gpadmin/cloudberry/src/test/regress/testtablespace_existing_version_dir/2: +/ABSPATH/testtablespace_existing_version_dir/2: GPDB_99_399999991 -/home/gpadmin/cloudberry/src/test/regress/testtablespace_existing_version_dir/3: +/ABSPATH/testtablespace_existing_version_dir/3: GPDB_99_399999991 -/home/gpadmin/cloudberry/src/test/regress/testtablespace_existing_version_dir/4: +/ABSPATH/testtablespace_existing_version_dir/4: GPDB_99_399999991 -/home/gpadmin/cloudberry/src/test/regress/testtablespace_existing_version_dir/5: +/ABSPATH/testtablespace_existing_version_dir/5: GPDB_99_399999991 -/home/gpadmin/cloudberry/src/test/regress/testtablespace_existing_version_dir/6: +/ABSPATH/testtablespace_existing_version_dir/6: GPDB_99_399999991 -/home/gpadmin/cloudberry/src/test/regress/testtablespace_existing_version_dir/7: +/ABSPATH/testtablespace_existing_version_dir/7: GPDB_99_399999991 -/home/gpadmin/cloudberry/src/test/regress/testtablespace_existing_version_dir/8: +/ABSPATH/testtablespace_existing_version_dir/8: GPDB_99_399999991 -- Test alter tablespace: PG does not seem to test these. -- test SET & OWNER diff --git a/src/test/regress/expected/profile.out b/src/test/regress/expected/profile.out index 256d41024db..9c2c203602b 100644 --- a/src/test/regress/expected/profile.out +++ b/src/test/regress/expected/profile.out @@ -5,7 +5,7 @@ SELECT COUNT(*) FROM pg_stat_activity; count ------- - 10 + 9 (1 row) -- Display pg_authid, pg_roles, pg_profile and pg_password_history catalog diff --git a/src/test/regress/expected/stats.out b/src/test/regress/expected/stats.out index 55b836f029c..b0e53f2141b 100644 --- a/src/test/regress/expected/stats.out +++ b/src/test/regress/expected/stats.out @@ -413,7 +413,7 @@ INSERT INTO drop_stats_test_xact DEFAULT VALUES; SELECT n_tup_ins FROM gp_stat_xact_all_tables_summary where relid = :drop_stats_test_xact_oid; n_tup_ins ----------- - 1 + 2 (1 row) DROP TABLE drop_stats_test_xact; @@ -459,7 +459,7 @@ INSERT INTO drop_stats_test_xact DEFAULT VALUES; SELECT n_tup_ins FROM gp_stat_xact_all_tables_summary where relid = :drop_stats_test_xact_oid; n_tup_ins ----------- - 1 + 2 (1 row) DROP TABLE drop_stats_test_xact; @@ -499,7 +499,7 @@ INSERT INTO drop_stats_test_subxact DEFAULT VALUES; SELECT n_tup_ins FROM gp_stat_xact_all_tables_summary where relid = :drop_stats_test_subxact_oid; n_tup_ins ----------- - 2 + 4 (1 row) SAVEPOINT sp2; @@ -508,7 +508,7 @@ ROLLBACK TO SAVEPOINT sp2; SELECT n_tup_ins FROM gp_stat_xact_all_tables_summary where relid = :drop_stats_test_subxact_oid; n_tup_ins ----------- - 2 + 4 (1 row) COMMIT; diff --git a/src/test/regress/input/uao_dml/uao_dml.source b/src/test/regress/input/uao_dml/uao_dml.source index b51faff222d..e13a17c2b20 100644 --- a/src/test/regress/input/uao_dml/uao_dml.source +++ b/src/test/regress/input/uao_dml/uao_dml.source @@ -70,11 +70,11 @@ select reltuples from pg_class where relname = 'ao2_@amname@'; select count(*) from ao2_@amname@; delete from ao2_@amname@ where i < 27; -- make sure the pgstat msg sends out at least PGSTAT_STAT_INTERVAL msec since last one -select pg_sleep(0.6); +SELECT gp_stat_force_next_flush(); analyze ao2_@amname@; select count(*) from ao2_@amname@; -- make sure the pgstat msg sends out at least PGSTAT_STAT_INTERVAL msec since last one -select pg_sleep(0.6); +SELECT gp_stat_force_next_flush(); select pg_stat_get_live_tuples(c.oid) as livetuples, pg_stat_get_dead_tuples(c.oid) as deadtuples from pg_class c where relname = 'ao2_@amname@'; diff --git a/src/test/regress/output/uao_dml/uao_dml.source b/src/test/regress/output/uao_dml/uao_dml.source index 49963db03e7..db6c4ec0200 100644 --- a/src/test/regress/output/uao_dml/uao_dml.source +++ b/src/test/regress/output/uao_dml/uao_dml.source @@ -147,9 +147,9 @@ select count(*) from ao2_@amname@; delete from ao2_@amname@ where i < 27; -- make sure the pgstat msg sends out at least PGSTAT_STAT_INTERVAL msec since last one -select pg_sleep(0.6); - pg_sleep ----------- +SELECT gp_stat_force_next_flush(); + gp_stat_force_next_flush +-------------------------- (1 row) @@ -161,9 +161,9 @@ select count(*) from ao2_@amname@; (1 row) -- make sure the pgstat msg sends out at least PGSTAT_STAT_INTERVAL msec since last one -select pg_sleep(0.6); - pg_sleep ----------- +SELECT gp_stat_force_next_flush(); + gp_stat_force_next_flush +-------------------------- (1 row) diff --git a/src/test/regress/sql/external_table.sql b/src/test/regress/sql/external_table.sql index b8054a085d4..29e9270ce19 100644 --- a/src/test/regress/sql/external_table.sql +++ b/src/test/regress/sql/external_table.sql @@ -23,6 +23,10 @@ -- m/DETAIL: Found \d+ URLs and \d+ primary segments./ -- s/Found.+// -- +-- # normalize absolute source paths across environments (also handles file:// URIs) +-- m|/.+/src/test/regress/| +-- s|/.+/src/test/regress/|/ABSPATH/src/test/regress/| +-- -- end_matchsubs \getenv abs_srcdir PG_ABS_SRCDIR \getenv hostname PG_HOSTNAME diff --git a/src/test/regress/sql/gp_tablespace.sql b/src/test/regress/sql/gp_tablespace.sql index 30ab9236949..fbfd411201e 100644 --- a/src/test/regress/sql/gp_tablespace.sql +++ b/src/test/regress/sql/gp_tablespace.sql @@ -1,3 +1,7 @@ +-- start_matchsubs +-- m|/.*/testtablespace_existing_version_dir/| +-- s|/.*/testtablespace_existing_version_dir/|/ABSPATH/testtablespace_existing_version_dir/| +-- end_matchsubs -- start_matchignore -- m/WARNING: tablespace symlink path is too long for TAR/ -- m/DETAIL: The symlinked path \".*\" will be truncated to 100 characters when sending a TAR to the utilities \(e.g. pg_basebackup\)/ From 366f3e9ec9ce95ef401d4ca7fa0e7be6975d30e0 Mon Sep 17 00:00:00 2001 From: liushengsong Date: Tue, 17 Mar 2026 15:55:52 +0800 Subject: [PATCH 4/6] fix isolation2 use fast not intermediate mode in gpstop and pg_ctl --- src/test/isolation2/expected/gdd/end.out | 2 +- src/test/isolation2/expected/gdd/prepare.out | 2 +- .../isolation2/expected/pg_rewind_fail_missing_xlog.out | 6 +++--- src/test/isolation2/expected/prepare_limit.out | 4 ++-- src/test/isolation2/expected/resgroup/resgroup_syntax.out | 4 ++-- src/test/isolation2/init_file_isolation2 | 4 ++-- src/test/isolation2/input/workfile_mgr_test.source | 4 ++-- src/test/isolation2/output/workfile_mgr_test.source | 4 ++-- src/test/isolation2/sql/bitmap_index_crash.sql | 2 +- src/test/isolation2/sql/gdd/end.sql | 2 +- src/test/isolation2/sql/gdd/prepare.sql | 2 +- src/test/isolation2/sql/pg_rewind_fail_missing_xlog.sql | 6 +++--- src/test/isolation2/sql/prepare_limit.sql | 4 ++-- src/test/isolation2/sql/resgroup/resgroup_syntax.sql | 4 ++-- 14 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/test/isolation2/expected/gdd/end.out b/src/test/isolation2/expected/gdd/end.out index 01a10b8a47a..920e841c196 100644 --- a/src/test/isolation2/expected/gdd/end.out +++ b/src/test/isolation2/expected/gdd/end.out @@ -6,7 +6,7 @@ ALTER -- Use utility session on seg 0 to restart master. This way avoids the -- situation where session issuing the restart doesn't disappear -- itself. -1U:SELECT pg_ctl(dir, 'restart') from datadir; +1U:SELECT pg_ctl(dir, 'restart', 'fast') from datadir; pg_ctl -------- OK diff --git a/src/test/isolation2/expected/gdd/prepare.out b/src/test/isolation2/expected/gdd/prepare.out index d8940c2d3cf..ebe57f46311 100644 --- a/src/test/isolation2/expected/gdd/prepare.out +++ b/src/test/isolation2/expected/gdd/prepare.out @@ -75,7 +75,7 @@ ALTER -- Use utility session on seg 0 to restart master. This way avoids the -- situation where session issuing the restart doesn't disappear -- itself. -1U:SELECT pg_ctl(dir, 'restart') from datadir; +1U:SELECT pg_ctl(dir, 'restart', 'fast') from datadir; pg_ctl -------- OK diff --git a/src/test/isolation2/expected/pg_rewind_fail_missing_xlog.out b/src/test/isolation2/expected/pg_rewind_fail_missing_xlog.out index 845dc6be0f7..cb0f6ca1481 100644 --- a/src/test/isolation2/expected/pg_rewind_fail_missing_xlog.out +++ b/src/test/isolation2/expected/pg_rewind_fail_missing_xlog.out @@ -19,7 +19,7 @@ INSERT 3 -- end_ignore (exited with code 0) -!\retcode gpstop -ari; +!\retcode gpstop -arf; (exited with code 0) -- Test 1: Ensure that pg_rewind doesn't fail due to checkpoints inadvertently @@ -543,7 +543,7 @@ server closed the connection unexpectedly -- end_ignore (exited with code 0) -!\retcode gpstop -ari; +!\retcode gpstop -arf; -- start_ignore -- end_ignore (exited with code 0) @@ -663,7 +663,7 @@ DROP -- end_ignore (exited with code 0) -!\retcode gpstop -ari; +!\retcode gpstop -arf; -- start_ignore -- end_ignore (exited with code 0) diff --git a/src/test/isolation2/expected/prepare_limit.out b/src/test/isolation2/expected/prepare_limit.out index c9479617b27..d12b869db47 100644 --- a/src/test/isolation2/expected/prepare_limit.out +++ b/src/test/isolation2/expected/prepare_limit.out @@ -14,7 +14,7 @@ -- Enable gp_autostats_mode to make sure the single value insert triger 2pc !\retcode gpconfig -c gp_autostats_mode -v 'on_no_stats' --skipvalidation; (exited with code 0) -!\retcode gpstop -ari; +!\retcode gpstop -arf; (exited with code 0) 5: create table prepare_limit1 (a int); @@ -119,5 +119,5 @@ DROP (exited with code 0) !\retcode gpconfig -c gp_autostats_mode -v 'none' --skipvalidation; (exited with code 0) -!\retcode gpstop -ari; +!\retcode gpstop -arf; (exited with code 0) diff --git a/src/test/isolation2/expected/resgroup/resgroup_syntax.out b/src/test/isolation2/expected/resgroup/resgroup_syntax.out index 1b645564f2d..2b5cd0290ac 100644 --- a/src/test/isolation2/expected/resgroup/resgroup_syntax.out +++ b/src/test/isolation2/expected/resgroup/resgroup_syntax.out @@ -563,7 +563,7 @@ DROP -- start_ignore -- end_ignore (exited with code 0) -!\retcode gpstop -ari; +!\retcode gpstop -arf; -- start_ignore -- end_ignore (exited with code 0) @@ -579,7 +579,7 @@ DROP -- start_ignore -- end_ignore (exited with code 0) -!\retcode gpstop -ari; +!\retcode gpstop -arf; -- start_ignore -- end_ignore (exited with code 0) diff --git a/src/test/isolation2/init_file_isolation2 b/src/test/isolation2/init_file_isolation2 index c359d3b8254..cb83b282be7 100644 --- a/src/test/isolation2/init_file_isolation2 +++ b/src/test/isolation2/init_file_isolation2 @@ -47,8 +47,8 @@ m/.*Process \d+ waits for ExclusiveLock on resource queue \d+; blocked by proces s/.*Process \d+ waits for ExclusiveLock on resource queue \d+; blocked by process \d+./Process PID waits for ExclusiveLock on resource queue OID; blocked by process PID./ # For resource queue self-deadlock detail -m/resource queue id: \d+, portal id: \d+/ -s/resource queue id: \d+, portal id: \d+/resource queue id: OID, portal id: NUM/ +m/resource queue id: (\d+|XXXX), portal id: \d+/ +s/resource queue id: (\d+|XXXX), portal id: \d+/resource queue id: OID, portal id: NUM/ m/^Process \d+ waits for ShareLock on transaction \d+; blocked by process \d+./ s/^Process \d+ waits for ShareLock on transaction \d+; blocked by process \d+./Process PID waits for ShareLock on transaction XID; blocked by process PID./ diff --git a/src/test/isolation2/input/workfile_mgr_test.source b/src/test/isolation2/input/workfile_mgr_test.source index 30f03315d7e..f5e189e694b 100644 --- a/src/test/isolation2/input/workfile_mgr_test.source +++ b/src/test/isolation2/input/workfile_mgr_test.source @@ -57,7 +57,7 @@ language plpgsql volatile execute on all segments; -- start_ignore !\retcode gpconfig -c gp_workfile_max_entries -v 32 --skipvalidation; -!\retcode gpstop -ari; +!\retcode gpstop -arf; -- end_ignore -- setup for workfile made in temp tablespace test @@ -80,7 +80,7 @@ language plpgsql volatile execute on all segments; -- start_ignore !\retcode gpconfig -r gp_workfile_max_entries --skipvalidation; -!\retcode gpstop -ari; +!\retcode gpstop -arf; -- end_ignore -- test workset cleanup diff --git a/src/test/isolation2/output/workfile_mgr_test.source b/src/test/isolation2/output/workfile_mgr_test.source index ecf5438ca72..aca6dd16adf 100644 --- a/src/test/isolation2/output/workfile_mgr_test.source +++ b/src/test/isolation2/output/workfile_mgr_test.source @@ -30,7 +30,7 @@ CREATE -- end_ignore (exited with code 0) -!\retcode gpstop -ari; +!\retcode gpstop -arf; -- start_ignore 20200923:12:05:57:014232 gpstop:mdw:gpadmin-[INFO]:-Starting gpstop with args: -ari 20200923:12:05:57:014232 gpstop:mdw:gpadmin-[INFO]:-Gathering information and validating the environment... @@ -132,7 +132,7 @@ DROP -- end_ignore (exited with code 0) -!\retcode gpstop -ari; +!\retcode gpstop -arf; -- start_ignore 20200923:12:08:05:016154 gpstop:mdw:gpadmin-[INFO]:-Starting gpstop with args: -ari 20200923:12:08:05:016154 gpstop:mdw:gpadmin-[INFO]:-Gathering information and validating the environment... diff --git a/src/test/isolation2/sql/bitmap_index_crash.sql b/src/test/isolation2/sql/bitmap_index_crash.sql index f29d82ca649..7b696451577 100644 --- a/src/test/isolation2/sql/bitmap_index_crash.sql +++ b/src/test/isolation2/sql/bitmap_index_crash.sql @@ -49,7 +49,7 @@ create index on test_bitmap using bitmap(type); select count(*) from test_bitmap where type = 520; -- start_ignore -! gpstop -rai; +! gpstop -raf; -- end_ignore 0: select count(*) from test_bitmap where type = 520; diff --git a/src/test/isolation2/sql/gdd/end.sql b/src/test/isolation2/sql/gdd/end.sql index 1d1b8e1ed50..676f24f7f20 100644 --- a/src/test/isolation2/sql/gdd/end.sql +++ b/src/test/isolation2/sql/gdd/end.sql @@ -4,7 +4,7 @@ ALTER SYSTEM RESET gp_global_deadlock_detector_period; -- Use utility session on seg 0 to restart master. This way avoids the -- situation where session issuing the restart doesn't disappear -- itself. -1U:SELECT pg_ctl(dir, 'restart') from datadir; +1U:SELECT pg_ctl(dir, 'restart', 'fast') from datadir; -- Start new session on master to make sure it has fully completed -- recovery and up and running again. 1: SHOW gp_enable_global_deadlock_detector; diff --git a/src/test/isolation2/sql/gdd/prepare.sql b/src/test/isolation2/sql/gdd/prepare.sql index 96448e512f1..ca1dbed2323 100644 --- a/src/test/isolation2/sql/gdd/prepare.sql +++ b/src/test/isolation2/sql/gdd/prepare.sql @@ -59,7 +59,7 @@ ALTER SYSTEM SET gp_global_deadlock_detector_period TO 5; -- Use utility session on seg 0 to restart master. This way avoids the -- situation where session issuing the restart doesn't disappear -- itself. -1U:SELECT pg_ctl(dir, 'restart') from datadir; +1U:SELECT pg_ctl(dir, 'restart', 'fast') from datadir; -- Start new session on master to make sure it has fully completed -- recovery and up and running again. 1: SHOW gp_enable_global_deadlock_detector; diff --git a/src/test/isolation2/sql/pg_rewind_fail_missing_xlog.sql b/src/test/isolation2/sql/pg_rewind_fail_missing_xlog.sql index 9a1ffa2781a..bf3da6b67f3 100644 --- a/src/test/isolation2/sql/pg_rewind_fail_missing_xlog.sql +++ b/src/test/isolation2/sql/pg_rewind_fail_missing_xlog.sql @@ -25,7 +25,7 @@ INSERT INTO tst_missing_tbl values(2),(1),(5); -- Make the test faster by not preserving any extra wal segment files !\retcode gpconfig -c wal_keep_size -v 0; -!\retcode gpstop -ari; +!\retcode gpstop -arf; -- Test 1: Ensure that pg_rewind doesn't fail due to checkpoints inadvertently -- recycling WAL when a former primary is marked down in configuration, while it @@ -269,7 +269,7 @@ INSERT INTO tst_missing_tbl values(2),(1),(5); -- Turn off wal_recycle to make this test easier to write. !\retcode gpconfig -c wal_recycle -v false; -!\retcode gpstop -ari; +!\retcode gpstop -arf; -- Create an unlogged table on the primary that remembers replication slot's last restart_lsn and number of WAL files. 1U: CREATE UNLOGGED TABLE unlogged_wal_retention_test(restart_lsn_before pg_lsn, wal_count_before int); @@ -320,4 +320,4 @@ INSERT INTO tst_missing_tbl values(2),(1),(5); 5: DROP FUNCTION connectSeg; !\retcode gpconfig -r wal_keep_size; !\retcode gpconfig -r wal_recycle; -!\retcode gpstop -ari; +!\retcode gpstop -arf; diff --git a/src/test/isolation2/sql/prepare_limit.sql b/src/test/isolation2/sql/prepare_limit.sql index c3fc5831bfb..71aa13d02fe 100644 --- a/src/test/isolation2/sql/prepare_limit.sql +++ b/src/test/isolation2/sql/prepare_limit.sql @@ -8,7 +8,7 @@ !\retcode gpconfig -c max_prepared_transactions -v 3 --skipvalidation; -- Enable gp_autostats_mode to make sure the single value insert triger 2pc !\retcode gpconfig -c gp_autostats_mode -v 'on_no_stats' --skipvalidation; -!\retcode gpstop -ari; +!\retcode gpstop -arf; 5: create table prepare_limit1 (a int); 5: create table prepare_limit2 (a int); @@ -62,4 +62,4 @@ -- to 250 which is the default value when demo cluster is created. !\retcode gpconfig -c max_prepared_transactions -v 250 --skipvalidation; !\retcode gpconfig -c gp_autostats_mode -v 'none' --skipvalidation; -!\retcode gpstop -ari; +!\retcode gpstop -arf; diff --git a/src/test/isolation2/sql/resgroup/resgroup_syntax.sql b/src/test/isolation2/sql/resgroup/resgroup_syntax.sql index 557b80af71a..278506034ad 100644 --- a/src/test/isolation2/sql/resgroup/resgroup_syntax.sql +++ b/src/test/isolation2/sql/resgroup/resgroup_syntax.sql @@ -278,13 +278,13 @@ DROP RESOURCE GROUP rg_test_group; -- test set cpu_max_percent to high value when gp_resource_group_cpu_limit is low -- start_ignore !\retcode gpconfig -c gp_resource_group_cpu_limit -v 0.5; -!\retcode gpstop -ari; +!\retcode gpstop -arf; -- end_ignore 0: CREATE RESOURCE GROUP rg_test_group WITH (cpu_max_percent=10); 0: ALTER RESOURCE GROUP rg_test_group SET cpu_max_percent 100; 0: DROP RESOURCE GROUP rg_test_group; -- start_ignore !\retcode gpconfig -c gp_resource_group_cpu_limit -v 1; -!\retcode gpstop -ari; +!\retcode gpstop -arf; -- end_ignore From 27b7b9c62b0ee00592368d8b11977b3e6bcd8f28 Mon Sep 17 00:00:00 2001 From: liushengsong Date: Wed, 18 Mar 2026 15:42:55 +0800 Subject: [PATCH 5/6] fix isolation2 --- src/bin/pg_basebackup/bbstreamer_file.c | 7 +++-- src/test/isolation2/Makefile | 2 +- .../expected/bitmap_index_crash.out | 2 +- .../expected/instr_in_shmem_setup.out | 2 +- .../resgroup/resgroup_auxiliary_tools_v1.out | 2 +- .../resgroup/resgroup_auxiliary_tools_v2.out | 2 +- .../resgroup_cpuset_empty_default.out | 2 +- .../resgroup/resgroup_disable_resgroup.out | 2 +- .../isolation2/sql/instr_in_shmem_setup.sql | 2 +- .../resgroup/resgroup_auxiliary_tools_v1.sql | 2 +- .../resgroup/resgroup_auxiliary_tools_v2.sql | 2 +- .../resgroup_cpuset_empty_default.sql | 2 +- .../sql/restore_memory_accounting_default.sql | 2 +- .../sql/setup_memory_accounting.sql | 2 +- .../sql/setup_startup_memory_accounting.sql | 2 +- src/test/regress/expected/gp_connections.out | 29 +++++++++-------- src/test/regress/sql/gp_connections.sql | 31 ++++++++++--------- 17 files changed, 51 insertions(+), 44 deletions(-) diff --git a/src/bin/pg_basebackup/bbstreamer_file.c b/src/bin/pg_basebackup/bbstreamer_file.c index ec76084c8d4..8bb0a9256ce 100644 --- a/src/bin/pg_basebackup/bbstreamer_file.c +++ b/src/bin/pg_basebackup/bbstreamer_file.c @@ -323,12 +323,15 @@ extract_directory(const char *filename, mode_t mode) * pg_xlog we assume is deleted at the start of * pg_basebackup. We cannot delete pg_xlog because if * streammode was used then it may have already copied - * new xlog files into pg_xlog directory. + * new xlog files into pg_xlog directory. Similarly, + * archive_status may have .done files created by the + * WAL streamer child process via mark_file_as_archived(). */ if (pg_str_endswith(filename, "/pg_log") || pg_str_endswith(filename, "/log") || pg_str_endswith(filename, "/pg_wal") || - pg_str_endswith(filename, "/pg_xlog")) + pg_str_endswith(filename, "/pg_xlog") || + pg_str_endswith(filename, "/archive_status")) return; rmtree(filename, true); diff --git a/src/test/isolation2/Makefile b/src/test/isolation2/Makefile index 759b2855513..02e4d4c549a 100644 --- a/src/test/isolation2/Makefile +++ b/src/test/isolation2/Makefile @@ -29,7 +29,7 @@ test_parallel_retrieve_cursor_extended_query_error: test_parallel_retrieve_curso $(CC) $(CPPFLAGS) $(rpath) -I$(top_builddir)/src/interfaces/libpq -L$(GPHOME)/lib -L$(top_builddir)/src/interfaces/libpq -o $@ $< -lpq pg_regress.o: - $(MAKE) -C $(top_builddir)/src/test/regress pg_regress.o + $(MAKE) -C $(top_builddir)/src/test/regress install rm -f $@ && $(LN_S) $(top_builddir)/src/test/regress/pg_regress.o . gpstringsubs.pl: diff --git a/src/test/isolation2/expected/bitmap_index_crash.out b/src/test/isolation2/expected/bitmap_index_crash.out index 7dce1ae6d31..1a6d3497367 100644 --- a/src/test/isolation2/expected/bitmap_index_crash.out +++ b/src/test/isolation2/expected/bitmap_index_crash.out @@ -111,7 +111,7 @@ select count(*) from test_bitmap where type = 520; (1 row) -- start_ignore -! gpstop -rai; +! gpstop -raf; -- end_ignore 0: select count(*) from test_bitmap where type = 520; diff --git a/src/test/isolation2/expected/instr_in_shmem_setup.out b/src/test/isolation2/expected/instr_in_shmem_setup.out index 0a01c288885..3dca236d50f 100644 --- a/src/test/isolation2/expected/instr_in_shmem_setup.out +++ b/src/test/isolation2/expected/instr_in_shmem_setup.out @@ -1,3 +1,3 @@ -- start_ignore -! gpconfig -c gp_enable_query_metrics -v on; ! gpstop -rai; +! gpconfig -c gp_enable_query_metrics -v on; ! gpstop -raf; -- end_ignore diff --git a/src/test/isolation2/expected/resgroup/resgroup_auxiliary_tools_v1.out b/src/test/isolation2/expected/resgroup/resgroup_auxiliary_tools_v1.out index 1120930c158..17bfbb23fee 100644 --- a/src/test/isolation2/expected/resgroup/resgroup_auxiliary_tools_v1.out +++ b/src/test/isolation2/expected/resgroup/resgroup_auxiliary_tools_v1.out @@ -27,7 +27,7 @@ ERROR: language "plpython3u" already exists ! gpconfig -c runaway_detector_activation_percent -v 100; -! gpstop -rai; +! gpstop -raf; -- end_ignore -- after the restart we need a new connection to run the queries diff --git a/src/test/isolation2/expected/resgroup/resgroup_auxiliary_tools_v2.out b/src/test/isolation2/expected/resgroup/resgroup_auxiliary_tools_v2.out index 779e4dd1bcf..f5325a2bb49 100644 --- a/src/test/isolation2/expected/resgroup/resgroup_auxiliary_tools_v2.out +++ b/src/test/isolation2/expected/resgroup/resgroup_auxiliary_tools_v2.out @@ -27,7 +27,7 @@ ERROR: language "plpython3u" already exists ! gpconfig -c runaway_detector_activation_percent -v 100; -! gpstop -rai; +! gpstop -raf; -- end_ignore -- after the restart we need a new connection to run the queries diff --git a/src/test/isolation2/expected/resgroup/resgroup_cpuset_empty_default.out b/src/test/isolation2/expected/resgroup/resgroup_cpuset_empty_default.out index c84e98b5779..751206f059b 100644 --- a/src/test/isolation2/expected/resgroup/resgroup_cpuset_empty_default.out +++ b/src/test/isolation2/expected/resgroup/resgroup_cpuset_empty_default.out @@ -30,7 +30,7 @@ ALTER RESOURCE GROUP -- start_ignore -! gpstop -rai; +! gpstop -raf; -- end_ignore -- Cleanup in a new connection as the default one is disconnected by gpstop diff --git a/src/test/isolation2/expected/resgroup/resgroup_disable_resgroup.out b/src/test/isolation2/expected/resgroup/resgroup_disable_resgroup.out index ae3324c605d..df0f9ddfd9e 100644 --- a/src/test/isolation2/expected/resgroup/resgroup_disable_resgroup.out +++ b/src/test/isolation2/expected/resgroup/resgroup_disable_resgroup.out @@ -2,7 +2,7 @@ -- start_ignore ! gpconfig -r gp_resource_manager; -! gpstop -rai; +! gpstop -ra; SHOW gp_resource_manager; gp_resource_manager diff --git a/src/test/isolation2/sql/instr_in_shmem_setup.sql b/src/test/isolation2/sql/instr_in_shmem_setup.sql index 911e5135561..e4490a6c3fc 100644 --- a/src/test/isolation2/sql/instr_in_shmem_setup.sql +++ b/src/test/isolation2/sql/instr_in_shmem_setup.sql @@ -1,4 +1,4 @@ -- start_ignore ! gpconfig -c gp_enable_query_metrics -v on; -! gpstop -rai; +! gpstop -raf; -- end_ignore diff --git a/src/test/isolation2/sql/resgroup/resgroup_auxiliary_tools_v1.sql b/src/test/isolation2/sql/resgroup/resgroup_auxiliary_tools_v1.sql index 5ff8a1fb50f..1e09cd70809 100644 --- a/src/test/isolation2/sql/resgroup/resgroup_auxiliary_tools_v1.sql +++ b/src/test/isolation2/sql/resgroup/resgroup_auxiliary_tools_v1.sql @@ -23,7 +23,7 @@ CREATE LANGUAGE plpython3u; ! gpconfig -c gp_resource_manager -v group; ! gpconfig -c max_connections -v 250 -m 25; ! gpconfig -c runaway_detector_activation_percent -v 100; -! gpstop -rai; +! gpstop -raf; -- end_ignore -- after the restart we need a new connection to run the queries diff --git a/src/test/isolation2/sql/resgroup/resgroup_auxiliary_tools_v2.sql b/src/test/isolation2/sql/resgroup/resgroup_auxiliary_tools_v2.sql index b791c1c31af..baea7711f50 100644 --- a/src/test/isolation2/sql/resgroup/resgroup_auxiliary_tools_v2.sql +++ b/src/test/isolation2/sql/resgroup/resgroup_auxiliary_tools_v2.sql @@ -23,7 +23,7 @@ CREATE LANGUAGE plpython3u; ! gpconfig -c gp_resource_manager -v group-v2; ! gpconfig -c max_connections -v 250 -m 25; ! gpconfig -c runaway_detector_activation_percent -v 100; -! gpstop -rai; +! gpstop -raf; -- end_ignore -- after the restart we need a new connection to run the queries diff --git a/src/test/isolation2/sql/resgroup/resgroup_cpuset_empty_default.sql b/src/test/isolation2/sql/resgroup/resgroup_cpuset_empty_default.sql index 2731486c424..9d05442de9b 100644 --- a/src/test/isolation2/sql/resgroup/resgroup_cpuset_empty_default.sql +++ b/src/test/isolation2/sql/resgroup/resgroup_cpuset_empty_default.sql @@ -25,7 +25,7 @@ ALTER RESOURCE GROUP rg1_cpuset_test SET cpuset '0'; ! psql -d isolation2resgrouptest -Ac "ALTER RESOURCE GROUP rg1_cpuset_test SET cpuset '0-$(($(nproc)-1))'"; -- start_ignore -! gpstop -rai; +! gpstop -raf; -- end_ignore -- Cleanup in a new connection as the default one is disconnected by gpstop diff --git a/src/test/isolation2/sql/restore_memory_accounting_default.sql b/src/test/isolation2/sql/restore_memory_accounting_default.sql index 4d5ba979c80..c7dfb4ca069 100644 --- a/src/test/isolation2/sql/restore_memory_accounting_default.sql +++ b/src/test/isolation2/sql/restore_memory_accounting_default.sql @@ -2,5 +2,5 @@ ! gpconfig -c gp_vmem_limit_per_query -v '0' --skipvalidation ! gpconfig -c gp_vmem_protect_limit -v '8192' ! gpconfig -c runaway_detector_activation_percent -v 0 -! gpstop -rai; +! gpstop -raf; -- end_ignore diff --git a/src/test/isolation2/sql/setup_memory_accounting.sql b/src/test/isolation2/sql/setup_memory_accounting.sql index 44d03f9f581..0def30c2226 100644 --- a/src/test/isolation2/sql/setup_memory_accounting.sql +++ b/src/test/isolation2/sql/setup_memory_accounting.sql @@ -2,5 +2,5 @@ ! gpconfig -c gp_vmem_limit_per_query -v '2MB' --skipvalidation ! gpconfig -c gp_vmem_protect_limit -v '20' ! gpconfig -c runaway_detector_activation_percent -v 0 -! gpstop -rai; +! gpstop -raf; -- end_ignore diff --git a/src/test/isolation2/sql/setup_startup_memory_accounting.sql b/src/test/isolation2/sql/setup_startup_memory_accounting.sql index b32f659ab56..1c9dcdce63b 100644 --- a/src/test/isolation2/sql/setup_startup_memory_accounting.sql +++ b/src/test/isolation2/sql/setup_startup_memory_accounting.sql @@ -2,5 +2,5 @@ ! gpconfig -c gp_vmem_limit_per_query -v '20MB' --skipvalidation ! gpconfig -c gp_vmem_protect_limit -v '60' ! gpconfig -c runaway_detector_activation_percent -v 0 -! gpstop -rai; +! gpstop -raf; -- end_ignore diff --git a/src/test/regress/expected/gp_connections.out b/src/test/regress/expected/gp_connections.out index 9fe6bfb2470..e4025e94b3e 100644 --- a/src/test/regress/expected/gp_connections.out +++ b/src/test/regress/expected/gp_connections.out @@ -1,6 +1,22 @@ -- -- GPDB internal connection tests -- +-- +-- Segment connection tests +-- +-- We should not be able to directly connect to a primary segment. +-- Use a psql subprocess to test connection; its exit code won't affect us. +-- start_matchsubs +-- m/at "localhost" \(.*\), port \d+/ +-- s/at "localhost" \(.*\), port \d+/at "localhost" (IP), port PORT/ +-- end_matchsubs +\! psql -h localhost -p $(psql -t -A -d regression -c "SELECT port FROM gp_segment_configuration WHERE content <> -1 AND role = 'p' LIMIT 1") -d postgres -c "SELECT 1" 2>&1 +psql: error: connection to server at "localhost" (IP), port PORT failed: FATAL: connections to primary segments are not allowed +DETAIL: This database instance is running as a primary segment in a Cloudberry cluster and does not permit direct connections. +HINT: To force a connection anyway (dangerous!), use utility mode. +-- +-- Internal connection tests +-- -- create a new user drop user if exists user_disallowed_via_local; create user user_disallowed_via_local with login; @@ -37,16 +53,3 @@ select * from t1_of_user_disallowed_via_local, pg_sleep(0); -- cleanup settings if any \! sed -i '/user_disallowed_via_local/d' $COORDINATOR_DATA_DIRECTORY/pg_hba.conf; --- --- Segment connection tests --- --- We should not be able to directly connect to a primary segment. --- start_ignore -SELECT port FROM gp_segment_configuration - WHERE content <> -1 AND role = 'p' - LIMIT 1 -\gset -ERROR: permission denied for view gp_segment_configuration -\connect - - - :port -\connect: invalid integer value ":port" for connection option "port" --- end_ignore diff --git a/src/test/regress/sql/gp_connections.sql b/src/test/regress/sql/gp_connections.sql index 9b24d978e48..92971cfc504 100644 --- a/src/test/regress/sql/gp_connections.sql +++ b/src/test/regress/sql/gp_connections.sql @@ -2,6 +2,22 @@ -- GPDB internal connection tests -- +-- +-- Segment connection tests +-- + +-- We should not be able to directly connect to a primary segment. +-- Use a psql subprocess to test connection; its exit code won't affect us. +-- start_matchsubs +-- m/at "localhost" \(.*\), port \d+/ +-- s/at "localhost" \(.*\), port \d+/at "localhost" (IP), port PORT/ +-- end_matchsubs +\! psql -h localhost -p $(psql -t -A -d regression -c "SELECT port FROM gp_segment_configuration WHERE content <> -1 AND role = 'p' LIMIT 1") -d postgres -c "SELECT 1" 2>&1 + +-- +-- Internal connection tests +-- + -- create a new user drop user if exists user_disallowed_via_local; create user user_disallowed_via_local with login; @@ -30,18 +46,3 @@ select * from t1_of_user_disallowed_via_local, pg_sleep(0); -- cleanup settings if any \! sed -i '/user_disallowed_via_local/d' $COORDINATOR_DATA_DIRECTORY/pg_hba.conf; - --- --- Segment connection tests --- - --- We should not be able to directly connect to a primary segment. --- start_ignore -SELECT port FROM gp_segment_configuration - WHERE content <> -1 AND role = 'p' - LIMIT 1 -\gset -\connect - - - :port --- end_ignore --- DON'T PUT ANYTHING BELOW THIS TEST! It'll be ignored since the above \connect --- fails and exits the script. Add them above, instead. From 92a8844bf79fea6fdcc633cf17c43fca335a8d31 Mon Sep 17 00:00:00 2001 From: liushengsong Date: Thu, 19 Mar 2026 11:07:09 +0800 Subject: [PATCH 6/6] 1 --- .../input/uao/ao_unique_index_vacuum.source | 9 +++++++++ .../output/uao/ao_unique_index_vacuum.source | 15 +++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/src/test/isolation2/input/uao/ao_unique_index_vacuum.source b/src/test/isolation2/input/uao/ao_unique_index_vacuum.source index 4b1f3ca0b4e..c2136f9ab9b 100644 --- a/src/test/isolation2/input/uao/ao_unique_index_vacuum.source +++ b/src/test/isolation2/input/uao/ao_unique_index_vacuum.source @@ -51,6 +51,11 @@ CREATE TABLE unique_index_vacuum_@amname@(i int UNIQUE) USING @amname@ INSERT INTO unique_index_vacuum_@amname@ SELECT generate_series(1, 5); DELETE FROM unique_index_vacuum_@amname@ WHERE i = 5; +-- Enable debug logging to diagnose flaky compaction behavior. +SET debug_appendonly_print_compaction = on; +SET debug_appendonly_print_segfile_choice = on; +SET debug_appendonly_print_visimap = on; + select gp_inject_fault_infinite('vacuum_ao_after_index_delete', 'skip', dbid) from gp_segment_configuration where role = 'p' AND content <> -1; @@ -64,4 +69,8 @@ SELECT gp_wait_until_triggered_fault('vacuum_ao_after_index_delete', 1, dbid) SELECT gp_inject_fault_infinite('vacuum_ao_after_index_delete', 'reset', dbid) FROM gp_segment_configuration WHERE role = 'p' AND content <> -1; +RESET debug_appendonly_print_compaction; +RESET debug_appendonly_print_segfile_choice; +RESET debug_appendonly_print_visimap; + DROP TABLE unique_index_vacuum_@amname@; diff --git a/src/test/isolation2/output/uao/ao_unique_index_vacuum.source b/src/test/isolation2/output/uao/ao_unique_index_vacuum.source index 74db357c6ab..65890131a2d 100644 --- a/src/test/isolation2/output/uao/ao_unique_index_vacuum.source +++ b/src/test/isolation2/output/uao/ao_unique_index_vacuum.source @@ -83,6 +83,14 @@ INSERT 5 DELETE FROM unique_index_vacuum_@amname@ WHERE i = 5; DELETE 1 +-- Enable debug logging to diagnose flaky compaction behavior. +SET debug_appendonly_print_compaction = on; +SET +SET debug_appendonly_print_segfile_choice = on; +SET +SET debug_appendonly_print_visimap = on; +SET + select gp_inject_fault_infinite('vacuum_ao_after_index_delete', 'skip', dbid) from gp_segment_configuration where role = 'p' AND content <> -1; gp_inject_fault_infinite -------------------------- @@ -112,5 +120,12 @@ SELECT gp_inject_fault_infinite('vacuum_ao_after_index_delete', 'reset', dbid) F Success: (3 rows) +RESET debug_appendonly_print_compaction; +RESET +RESET debug_appendonly_print_segfile_choice; +RESET +RESET debug_appendonly_print_visimap; +RESET + DROP TABLE unique_index_vacuum_@amname@; DROP