You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by yj...@apache.org on 2025/01/02 10:35:02 UTC

(cloudberry) branch main updated (41b93eebbc -> fa79ed67e5)

This is an automated email from the ASF dual-hosted git repository.

yjhjstz pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git


    from 41b93eebbc Fix icw test from "Cherry-Pick CUBE grouping set, predicates from subquery ..."
     new b6e9971f2a ao/co index build scans: Only use SnapshotAny
     new 339eebdd4e Remove FIXME in test index_constraint_naming_upgrade
     new 7979b1cbe6 Fix incorrect distkey when copy partitions on segment. (#14502)
     new d9888d7b3b Remove duplicate headerfile
     new 29b33b29b3 SIGPIPE during ending not exhausted external table scan (#14020)
     new d71f616082 Move stats related tests under disable_autovacuum for validity of index's reltuples.
     new fa79ed67e5 Ban reindexdb --concurrently

The 7 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 gpcontrib/gp_exttable_fdw/Makefile                 |  1 -
 src/backend/access/aocs/aocsam_handler.c           | 48 ++---------------
 .../access/appendonly/appendonlyam_handler.c       | 47 ++--------------
 src/backend/commands/copyfrom.c                    | 63 +++++++++++-----------
 src/backend/executor/execUtils.c                   | 23 ++++----
 src/bin/scripts/reindexdb.c                        | 19 ++++---
 .../expected/index_constraint_naming_upgrade.out   | 59 ++++++++++----------
 src/test/regress/greenplum_schedule                | 27 +++++-----
 src/test/regress/input/external_table.source       | 11 ++++
 src/test/regress/input/gpcopy.source               | 38 +++++++++++++
 src/test/regress/output/external_table.source      | 14 +++++
 src/test/regress/output/gpcopy.source              | 34 ++++++++++++
 .../sql/index_constraint_naming_upgrade.sql        | 24 ++++-----
 13 files changed, 216 insertions(+), 192 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org


(cloudberry) 04/07: Remove duplicate headerfile

Posted by yj...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yjhjstz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git

commit d9888d7b3b538c86d80820b1e3c310015ddf2239
Author: Himanshu Pandey <pa...@vmware.com>
AuthorDate: Thu Oct 27 10:55:02 2022 -0700

    Remove duplicate headerfile
---
 gpcontrib/gp_exttable_fdw/Makefile | 1 -
 1 file changed, 1 deletion(-)

diff --git a/gpcontrib/gp_exttable_fdw/Makefile b/gpcontrib/gp_exttable_fdw/Makefile
index 0441a36609..c38c05278d 100644
--- a/gpcontrib/gp_exttable_fdw/Makefile
+++ b/gpcontrib/gp_exttable_fdw/Makefile
@@ -8,7 +8,6 @@ OBJS = gp_exttable_fdw.o extaccess.o
 EXTENSION = gp_exttable_fdw
 DATA = gp_exttable_fdw--1.0.sql
 
-HEADERS = extaccess.h
 REGRESS =
 
 HEADERS = extaccess.h


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org


(cloudberry) 02/07: Remove FIXME in test index_constraint_naming_upgrade

Posted by yj...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yjhjstz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git

commit 339eebdd4eb4ca6ae6f227e7f9830e038b61af52
Author: Huansong Fu <fu...@gmail.com>
AuthorDate: Mon Nov 14 08:25:13 2022 -0800

    Remove FIXME in test index_constraint_naming_upgrade
    
    We used to rename index-backed constraints in the EXCHANGE PARTITION
    command in 6X. Now we don't. We've decided to keep that behavior
    in 7X after looking into the opposing arguments:
    
    Argument #1. It might cause problem during upgrade.
    - Firstly, we won't be using legacy syntax in the dump scripts so we
    just need to worry about the existing tables produced by EXCHANGE
    PARTITION. I.e. whether or not they can be restored correctly.
    - For upgrading from 6X->7X, since those tables already have matched
    constraint and index names with the table names, we should be OK.
    - For upgrading 7X->onward, since we implement EXCHANGE PARTIITON
    simply as a combination of upstream-syntax commands (see
    AtExecGPExchangePartition()), pg_upgrade should be able to handle
    them. We've verified that manually and the automated test should
    cover that too. In fact, this gives another point that we shouldn't
    do our own hacky things as part of EXCHANGE PARTITION which might
    confuse pg_upgrade.
    
    Argument #2. It might surprise the users and their existing workloads.
    - The indexed constraint names are all implicitly generated and
    shouldn't be directly used in most cases.
    - They are not the only thing that will appear changed. E.g. the
    normal indexes (e.g. B-tree ones) will be too. So the decision to
    change one should be made with changing all of them.
    
    More details see: https://docs.google.com/document/d/1enJdKYxkk5WFRV1WoqIgLgRxCGxOqI2nglJVE_Wglec
---
 .../expected/index_constraint_naming_upgrade.out   | 59 ++++++++++++----------
 .../sql/index_constraint_naming_upgrade.sql        | 24 ++++-----
 2 files changed, 44 insertions(+), 39 deletions(-)

diff --git a/src/test/regress/expected/index_constraint_naming_upgrade.out b/src/test/regress/expected/index_constraint_naming_upgrade.out
index 23a32dc834..621200d47d 100755
--- a/src/test/regress/expected/index_constraint_naming_upgrade.out
+++ b/src/test/regress/expected/index_constraint_naming_upgrade.out
@@ -58,47 +58,52 @@ SELECT table_name,* FROM constraints_and_indices() WHERE table_name::text='table
 DROP TYPE table_collision_a_b_key;
 -- *************************************************************
 -- Exchange Partition Scenario
--- Create a partition table with a primary key constraint
+-- Create two partition tables with primary key constraints.
+-- One to drop in this test, and one to be testd druing upgrade.
 CREATE TABLE part_table_for_upgrade (a INT, b INT) DISTRIBUTED BY (a) PARTITION BY RANGE(b) (PARTITION alpha  END (3), PARTITION beta START (3));
+CREATE TABLE part_table_for_upgrade2 (a INT, b INT) DISTRIBUTED BY (a) PARTITION BY RANGE(b) (PARTITION alpha  END (3), PARTITION beta START (3));
 ALTER TABLE part_table_for_upgrade ADD PRIMARY KEY(a, b);
+ALTER TABLE part_table_for_upgrade2 ADD PRIMARY KEY(a, b);
 -- Create a table to be used as a partition exchange.
 CREATE TABLE like_table (like part_table_for_upgrade INCLUDING CONSTRAINTS INCLUDING INDEXES) DISTRIBUTED BY (a) ;
+CREATE TABLE like_table2 (like part_table_for_upgrade INCLUDING CONSTRAINTS INCLUDING INDEXES) DISTRIBUTED BY (a) ;
 -- show constraint and index names
-SELECT table_name,* FROM constraints_and_indices() WHERE table_name::text='part_table_for_upgrade';
-       table_name       |       table_name       |       constraint_name       |         index_name          | constraint_type 
-------------------------+------------------------+-----------------------------+-----------------------------+-----------------
- part_table_for_upgrade | part_table_for_upgrade | part_table_for_upgrade_pkey | part_table_for_upgrade_pkey | p
-(1 row)
+SELECT table_name,* FROM constraints_and_indices() WHERE table_name::text IN ('part_table_for_upgrade', 'part_table_for_upgrade2');
+       table_name        |       table_name        |       constraint_name        |          index_name          | constraint_type 
+-------------------------+-------------------------+------------------------------+------------------------------+-----------------
+ part_table_for_upgrade  | part_table_for_upgrade  | part_table_for_upgrade_pkey  | part_table_for_upgrade_pkey  | p
+ part_table_for_upgrade2 | part_table_for_upgrade2 | part_table_for_upgrade2_pkey | part_table_for_upgrade2_pkey | p
+(2 rows)
 
-SELECT table_name,* FROM constraints_and_indices() WHERE table_name::text='like_table';
- table_name | table_name | constraint_name |   index_name    | constraint_type 
-------------+------------+-----------------+-----------------+-----------------
- like_table | like_table | like_table_pkey | like_table_pkey | p
-(1 row)
+SELECT table_name,* FROM constraints_and_indices() WHERE table_name::text IN ('like_table', 'like_table2');
+ table_name  | table_name  | constraint_name  |    index_name    | constraint_type 
+-------------+-------------+------------------+------------------+-----------------
+ like_table  | like_table  | like_table_pkey  | like_table_pkey  | p
+ like_table2 | like_table2 | like_table2_pkey | like_table2_pkey | p
+(2 rows)
 
 -- Exchange the beta partition with like_table.
 -- Everything gets swapped, but the constraint index name of like_table does not match with part_table_for_upgrade_1_prt_beta.
 ALTER TABLE part_table_for_upgrade EXCHANGE PARTITION beta WITH TABLE like_table;
+ALTER TABLE part_table_for_upgrade2 EXCHANGE PARTITION beta WITH TABLE like_table2;
 -- show constraint and index names for each table
-SELECT table_name,* FROM constraints_and_indices() WHERE table_name::text='part_table_for_upgrade';
-       table_name       |       table_name       |       constraint_name       |         index_name          | constraint_type 
-------------------------+------------------------+-----------------------------+-----------------------------+-----------------
- part_table_for_upgrade | part_table_for_upgrade | part_table_for_upgrade_pkey | part_table_for_upgrade_pkey | p
-(1 row)
+SELECT table_name,* FROM constraints_and_indices() WHERE table_name::text IN ('part_table_for_upgrade', 'part_table_for_upgrade2');
+       table_name        |       table_name        |       constraint_name        |          index_name          | constraint_type 
+-------------------------+-------------------------+------------------------------+------------------------------+-----------------
+ part_table_for_upgrade  | part_table_for_upgrade  | part_table_for_upgrade_pkey  | part_table_for_upgrade_pkey  | p
+ part_table_for_upgrade2 | part_table_for_upgrade2 | part_table_for_upgrade2_pkey | part_table_for_upgrade2_pkey | p
+(2 rows)
 
--- GPDB_12_MERGE_FIXME: only tables are renamed in exchange partition,
--- constraints or indexes used to be renamed as well pre-GPDB7, not
--- any more. Does it surprise users (functionally it doesn't affect
--- anything)?
-SELECT table_name,* FROM constraints_and_indices() WHERE table_name::text='like_table';
- table_name | table_name |            constraint_name             |               index_name               | constraint_type 
-------------+------------+----------------------------------------+----------------------------------------+-----------------
- like_table | like_table | part_table_for_upgrade_1_prt_beta_pkey | part_table_for_upgrade_1_prt_beta_pkey | p
-(1 row)
+-- only tables are renamed in exchange partition
+SELECT table_name,* FROM constraints_and_indices() WHERE table_name::text IN ('like_table', 'like_table2');
+ table_name  | table_name  |             constraint_name             |               index_name                | constraint_type 
+-------------+-------------+-----------------------------------------+-----------------------------------------+-----------------
+ like_table  | like_table  | part_table_for_upgrade_1_prt_beta_pkey  | part_table_for_upgrade_1_prt_beta_pkey  | p
+ like_table2 | like_table2 | part_table_for_upgrade2_1_prt_beta_pkey | part_table_for_upgrade2_1_prt_beta_pkey | p
+(2 rows)
 
--- Drop part_table_for_upgrade before upgrade since that is not where the issue is.
+-- Drop the first partition table, the constraint in like_table should NOT be dropped
 DROP TABLE part_table_for_upgrade CASCADE;
--- Verify that the constraint in like_table was NOT dropped
 SELECT table_name,* FROM constraints_and_indices() WHERE table_name::text='like_table';
  table_name | table_name |            constraint_name             |               index_name               | constraint_type 
 ------------+------------+----------------------------------------+----------------------------------------+-----------------
diff --git a/src/test/regress/sql/index_constraint_naming_upgrade.sql b/src/test/regress/sql/index_constraint_naming_upgrade.sql
index e6878002ee..d552fb72d2 100644
--- a/src/test/regress/sql/index_constraint_naming_upgrade.sql
+++ b/src/test/regress/sql/index_constraint_naming_upgrade.sql
@@ -55,33 +55,33 @@ DROP TYPE table_collision_a_b_key;
 -- *************************************************************
 -- Exchange Partition Scenario
 
--- Create a partition table with a primary key constraint
+-- Create two partition tables with primary key constraints.
+-- One to drop in this test, and one to be testd druing upgrade.
 CREATE TABLE part_table_for_upgrade (a INT, b INT) DISTRIBUTED BY (a) PARTITION BY RANGE(b) (PARTITION alpha  END (3), PARTITION beta START (3));
+CREATE TABLE part_table_for_upgrade2 (a INT, b INT) DISTRIBUTED BY (a) PARTITION BY RANGE(b) (PARTITION alpha  END (3), PARTITION beta START (3));
 ALTER TABLE part_table_for_upgrade ADD PRIMARY KEY(a, b);
+ALTER TABLE part_table_for_upgrade2 ADD PRIMARY KEY(a, b);
 -- Create a table to be used as a partition exchange.
 CREATE TABLE like_table (like part_table_for_upgrade INCLUDING CONSTRAINTS INCLUDING INDEXES) DISTRIBUTED BY (a) ;
+CREATE TABLE like_table2 (like part_table_for_upgrade INCLUDING CONSTRAINTS INCLUDING INDEXES) DISTRIBUTED BY (a) ;
 
 -- show constraint and index names
-SELECT table_name,* FROM constraints_and_indices() WHERE table_name::text='part_table_for_upgrade';
-SELECT table_name,* FROM constraints_and_indices() WHERE table_name::text='like_table';
+SELECT table_name,* FROM constraints_and_indices() WHERE table_name::text IN ('part_table_for_upgrade', 'part_table_for_upgrade2');
+SELECT table_name,* FROM constraints_and_indices() WHERE table_name::text IN ('like_table', 'like_table2');
 
 -- Exchange the beta partition with like_table.
 -- Everything gets swapped, but the constraint index name of like_table does not match with part_table_for_upgrade_1_prt_beta.
 ALTER TABLE part_table_for_upgrade EXCHANGE PARTITION beta WITH TABLE like_table;
+ALTER TABLE part_table_for_upgrade2 EXCHANGE PARTITION beta WITH TABLE like_table2;
 
 -- show constraint and index names for each table
-SELECT table_name,* FROM constraints_and_indices() WHERE table_name::text='part_table_for_upgrade';
+SELECT table_name,* FROM constraints_and_indices() WHERE table_name::text IN ('part_table_for_upgrade', 'part_table_for_upgrade2');
 
--- GPDB_12_MERGE_FIXME: only tables are renamed in exchange partition,
--- constraints or indexes used to be renamed as well pre-GPDB7, not
--- any more. Does it surprise users (functionally it doesn't affect
--- anything)?
-SELECT table_name,* FROM constraints_and_indices() WHERE table_name::text='like_table';
+-- only tables are renamed in exchange partition
+SELECT table_name,* FROM constraints_and_indices() WHERE table_name::text IN ('like_table', 'like_table2');
 
--- Drop part_table_for_upgrade before upgrade since that is not where the issue is.
+-- Drop the first partition table, the constraint in like_table should NOT be dropped
 DROP TABLE part_table_for_upgrade CASCADE;
-
--- Verify that the constraint in like_table was NOT dropped
 SELECT table_name,* FROM constraints_and_indices() WHERE table_name::text='like_table';
 
 -- *************************************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org


(cloudberry) 05/07: SIGPIPE during ending not exhausted external table scan (#14020)

Posted by yj...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yjhjstz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git

commit 29b33b29b3175e44c008ac50e27ebb971f395f27
Author: Georgy Shelkovy <Re...@users.noreply.github.com>
AuthorDate: Thu Sep 29 05:46:38 2022 +0600

    SIGPIPE during ending not exhausted external table scan (#14020)
    
    Executing a query that doesn't fetch all tuples from external scan that execute
    program on coordinator leads to the next error:
    
    ERROR:  external table table_master command ended with SHELL TERMINATED by
    signal SIGPIPE (13)
    DETAIL:  Command: execute:(echo foo; sleep 1; echo bar)
    
    There are several cases when gpdb ends unfinished plan: extended protocol,
    cursors. Greenplum communicate with shell command by pipe, it closes pipe while
    shell command steel sends results. And SIGPIPE happens here. In such cases
    if external web table is executed on segments, then it uses squelching
    mechanics, that provides a separate way to handle unfinished yet plan nodes and
    simply ignore SIGPIPE for externalScan. But the squelching doesn't execute
    for master-only plans on coordinator. So the solution is allowing squelching
    on master for such plans.
    
    The condition checking detail is discussed as followed:
    1. `Gp_role` is checked because we need squelching on coordinator
    2. `es_top_eflags` is checked because `es_got_eos` is not set by explain only.
    `es_got_eos` is set to `True` by `ExecutorRun`, which is not called by explain only,
    then `ExecutorEnd` tries squelch uninitialized state
---
 src/backend/executor/execUtils.c              | 23 +++++++++++------------
 src/test/regress/input/external_table.source  | 11 +++++++++++
 src/test/regress/output/external_table.source | 14 ++++++++++++++
 3 files changed, 36 insertions(+), 12 deletions(-)

diff --git a/src/backend/executor/execUtils.c b/src/backend/executor/execUtils.c
index d6fc4aab56..952c5e8737 100644
--- a/src/backend/executor/execUtils.c
+++ b/src/backend/executor/execUtils.c
@@ -2017,7 +2017,17 @@ void mppExecutorFinishup(QueryDesc *queryDesc)
 		estate->interconnect_context = NULL;
 		estate->es_interconnect_is_setup = false;
 	}
-
+	/*
+	 * If we are finishing a query before all the tuples of the query
+	 * plan were fetched we must call ExecSquelchNode before checking
+	 * the dispatch results in order to tell we no longer
+	 * need any more tuples.
+	 */
+	if (Gp_role == GP_ROLE_DISPATCH && !estate->es_got_eos &&
+		!(estate->es_top_eflags & EXEC_FLAG_EXPLAIN_ONLY))
+	{
+		ExecSquelchNode(queryDesc->planstate, true);
+	}
 	/*
 	 * If QD, wait for QEs to finish and check their results.
 	 */
@@ -2028,17 +2038,6 @@ void mppExecutorFinishup(QueryDesc *queryDesc)
 		DispatchWaitMode waitMode = DISPATCH_WAIT_NONE;
 		ErrorData *qeError = NULL;
 
-		/*
-		 * If we are finishing a query before all the tuples of the query
-		 * plan were fetched we must call ExecSquelchNode before checking
-		 * the dispatch results in order to tell the nodes below we no longer
-		 * need any more tuples.
-		 */
-		if (!estate->es_got_eos)
-		{
-			ExecSquelchNode(queryDesc->planstate, true);
-		}
-
 		/*
 		 * Wait for completion of all QEs.  We send a "graceful" query
 		 * finish, not cancel signal.  Since the query has succeeded,
diff --git a/src/test/regress/input/external_table.source b/src/test/regress/input/external_table.source
index 806dec1d08..0edba1e896 100644
--- a/src/test/regress/input/external_table.source
+++ b/src/test/regress/input/external_table.source
@@ -86,6 +86,7 @@ DROP EXTERNAL TABLE IF EXISTS exttab_udfs_1;
 DROP EXTERNAL TABLE IF EXISTS exttab_udfs_2;
 DROP EXTERNAL TABLE IF EXISTS exttab_views_3;
 DROP EXTERNAL WEB TABLE IF EXISTS table_env;
+DROP EXTERNAL WEB TABLE IF EXISTS table_master;
 DROP EXTERNAL WEB TABLE IF EXISTS table_qry;
 
 DROP VIEW IF EXISTS exttab_views_3;
@@ -117,6 +118,16 @@ CREATE EXTERNAL WEB TABLE table_env (val TEXT)
 SELECT * FROM table_env WHERE val LIKE 'GP_QUERY%' ORDER BY val ASC;
 SELECT * FROM table_env WHERE val LIKE 'GP_QUERY%\%' ESCAPE '&' ORDER BY val ASC;
 
+-- ensure squelching on master
+CREATE EXTERNAL WEB TABLE table_master (val TEXT)
+  EXECUTE E'cat @abs_srcdir@/data/lineitem.csv' ON MASTER
+  FORMAT 'TEXT' (ESCAPE 'OFF');
+BEGIN;
+DECLARE _psql_cursor NO SCROLL CURSOR FOR SELECT 1 FROM table_master;
+FETCH FORWARD 1 FROM _psql_cursor;
+CLOSE _psql_cursor;
+COMMIT;
+
 -- echo will behave differently on different platforms, force to use bash with -E option
 CREATE EXTERNAL WEB TABLE table_qry (val TEXT)
   EXECUTE E'/usr/bin/env bash -c ''echo -E "$GP_QUERY_STRING"''' ON SEGMENT 0
diff --git a/src/test/regress/output/external_table.source b/src/test/regress/output/external_table.source
index f18f80a08d..e518f03934 100644
--- a/src/test/regress/output/external_table.source
+++ b/src/test/regress/output/external_table.source
@@ -143,6 +143,20 @@ SELECT * FROM table_env WHERE val LIKE 'GP_QUERY%\%' ESCAPE '&' ORDER BY val ASC
  GP_QUERY_STRING=SELECT * FROM table_env WHERE val LIKE 'GP_QUERY%\%' ESCAPE '&' ORDER BY val ASC;
 (1 row)
 
+-- ensure squelching on master
+CREATE EXTERNAL WEB TABLE table_master (val TEXT)
+  EXECUTE E'cat @abs_srcdir@/data/lineitem.csv' ON MASTER
+  FORMAT 'TEXT' (ESCAPE 'OFF');
+BEGIN;
+DECLARE _psql_cursor NO SCROLL CURSOR FOR SELECT 1 FROM table_master;
+FETCH FORWARD 1 FROM _psql_cursor;
+ ?column? 
+----------
+        1
+(1 row)
+
+CLOSE _psql_cursor;
+COMMIT;
 -- echo will behave differently on different platforms, force to use bash with -E option
 CREATE EXTERNAL WEB TABLE table_qry (val TEXT)
   EXECUTE E'/usr/bin/env bash -c ''echo -E "$GP_QUERY_STRING"''' ON SEGMENT 0


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org


(cloudberry) 07/07: Ban reindexdb --concurrently

Posted by yj...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yjhjstz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git

commit fa79ed67e597bc0946637ed95c99c997e86325f8
Author: Soumyadeep Chakraborty <so...@gmail.com>
AuthorDate: Wed Jan 18 10:17:39 2023 -0800

    Ban reindexdb --concurrently
    
    Concurrent index builds/rebuilds are banned in GPDB, so also extend it
    to reindexdb.
    
    Finish the job that was started by e5b0e2531a2 and leave breadcrumb for
    version check which will be applicable once we do support it.
---
 src/bin/scripts/reindexdb.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/src/bin/scripts/reindexdb.c b/src/bin/scripts/reindexdb.c
index 22355d3897..2a2f09b5da 100644
--- a/src/bin/scripts/reindexdb.c
+++ b/src/bin/scripts/reindexdb.c
@@ -201,6 +201,17 @@ main(int argc, char *argv[])
 	cparams.prompt_password = prompt_password;
 	cparams.override_dbname = NULL;
 
+	if (concurrently)
+	{
+		/*
+		 * GPDB_12_MERGE_FEATURE_NOT_SUPPORTED: When we do support this feature,
+		 * a version guard against GP_VERSION_NUM should be introduced here to
+		 * ensure we don't run it against an unsupported version.
+		 */
+		pg_log_error("reindexing a database concurrently is not supported");
+		exit(1);
+	}
+
 	setup_cancel_handler(NULL);
 
 	if (alldb)
@@ -347,14 +358,6 @@ reindex_one_database(ConnParams *cparams, ReindexType type,
 
 	conn = connectDatabase(cparams, progname, echo, false, false);
 
-	if (concurrently && PQserverVersion(conn) < 120000)
-	{
-		PQfinish(conn);
-		pg_log_error("cannot use the \"%s\" option on server versions older than PostgreSQL %s",
-					 "concurrently", "12");
-		exit(1);
-	}
-
 	if (tablespace && PQserverVersion(conn) < 140000)
 	{
 		PQfinish(conn);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org


(cloudberry) 03/07: Fix incorrect distkey when copy partitions on segment. (#14502)

Posted by yj...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yjhjstz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git

commit 7979b1cbe63b16b9b99956a44c183eb3607b957c
Author: Xing Guo <hi...@gmail.com>
AuthorDate: Tue Nov 22 10:07:28 2022 +0800

    Fix incorrect distkey when copy partitions on segment. (#14502)
    
    When the column order isn't consistent between the root table and its
    partitions, the data distribution check may fail due to it referencing
    the root table's distribution policy.
    
    We have 2 optional choices to fix this issue:
    
    1. We should use partition's distribution policy for computing the
       tuple's target segment.
    
    2. As what we do in this PR, we move the distribution check logic before
       the reordering of the tuple's columns. Because before the reordering
       of the tuple's columns, the tuple's columns order is the same as the root
       table's column order. The benefit is that, we don't need to introduce
       another variable to store partition's distribution policy.
    
    Fix #14353.
---
 src/backend/commands/copyfrom.c       | 63 ++++++++++++++++++-----------------
 src/test/regress/input/gpcopy.source  | 38 +++++++++++++++++++++
 src/test/regress/output/gpcopy.source | 34 +++++++++++++++++++
 3 files changed, 104 insertions(+), 31 deletions(-)

diff --git a/src/backend/commands/copyfrom.c b/src/backend/commands/copyfrom.c
index d7aaf8b97a..004f1dd038 100644
--- a/src/backend/commands/copyfrom.c
+++ b/src/backend/commands/copyfrom.c
@@ -2103,6 +2103,38 @@ CopyFrom(CopyFromState cstate)
 			}
 		}
 
+		if (cstate->dispatch_mode != COPY_DISPATCH && is_check_distkey)
+		{
+			/*
+			 * In COPY FROM ON SEGMENT, check the distribution key in the
+			 * QE.
+			 * Note: For partitioned tables, the order of the root table's columns can be
+			 * inconsistent with the order of the partition's columns and Greenplum/PostgreSQL
+			 * allows such behavior. When they have different orders, we need to re-order the
+			 * TupleTableSlot (myslot) to make it match the partition's columns (see execute_attr_map_slot()
+			 * for details). We must perform this check before the re-ordering of TupleTableslot,
+			 * or the value of target_seg will be incorrect.
+			 */
+			if (distData->policy->nattrs != 0)
+			{
+				target_seg = GetTargetSeg(distData, myslot);
+				if (GpIdentity.segindex != target_seg)
+				{
+					PG_TRY();
+					{
+						ereport(ERROR,
+								(errcode(ERRCODE_INTEGRITY_CONSTRAINT_VIOLATION),
+								 errmsg("value of distribution key doesn't belong to segment with ID %d, it belongs to segment with ID %d",
+										GpIdentity.segindex, target_seg)));
+					}
+					PG_CATCH();
+					{
+						HandleCopyError(cstate);
+					}
+					PG_END_TRY();
+				}
+			}
+		}
 		/* Determine the partition to insert the tuple into */
 		if (proute && cstate->dispatch_mode != COPY_DISPATCH)
 		{
@@ -2242,37 +2274,6 @@ CopyFrom(CopyFromState cstate)
 		{
 			/* In QD, compute the target segment to send this row to. */
 			target_seg = GetTargetSeg(distData, myslot);
-		}
-		else if (is_check_distkey)
-		{
-			/*
-			 * In COPY FROM ON SEGMENT, check the distribution key in the
-			 * QE.
-			 */
-			if (distData->policy->nattrs != 0)
-			{
-				target_seg = GetTargetSeg(distData, myslot);
-
-				if (GpIdentity.segindex != target_seg)
-				{
-					PG_TRY();
-					{
-						ereport(ERROR,
-								(errcode(ERRCODE_INTEGRITY_CONSTRAINT_VIOLATION),
-								 errmsg("value of distribution key doesn't belong to segment with ID %d, it belongs to segment with ID %d",
-										GpIdentity.segindex, target_seg)));
-					}
-					PG_CATCH();
-					{
-						HandleCopyError(cstate);
-					}
-					PG_END_TRY();
-				}
-			}
-		}
-
-		if (cstate->dispatch_mode == COPY_DISPATCH)
-		{
 			bool send_to_all = distData &&
 							   GpPolicyIsReplicated(distData->policy);
 
diff --git a/src/test/regress/input/gpcopy.source b/src/test/regress/input/gpcopy.source
index c06f9ef113..9ed6edab85 100644
--- a/src/test/regress/input/gpcopy.source
+++ b/src/test/regress/input/gpcopy.source
@@ -1337,3 +1337,41 @@ COPY foo FROM PROGRAM 'cat /tmp/gpcopyenvtest' ESCAPE 'OFF';
 COPY foo FROM PROGRAM '/usr/bin/env bash -c ''echo -E database in COPY FROM: $GP_DATABASE''' ESCAPE 'OFF';
 
 select * from foo;
+
+--
+-- Test copy a partitioned table whose columns' orders are not consistent between the root table and partitions.
+--
+
+-- 1. Test copy a partitioned table with a single distribution key on segment.
+CREATE TABLE issue_14353       (a integer, b integer, c text) PARTITION BY RANGE (a) DISTRIBUTED BY (a);
+CREATE TABLE issue_14353_prt_1 (b integer, a integer, c text) DISTRIBUTED BY (a);
+CREATE TABLE issue_14353_def   (a integer, b integer, c text) DISTRIBUTED BY (a);
+
+ALTER TABLE ONLY issue_14353 ATTACH PARTITION issue_14353_prt_1 FOR VALUES FROM (1) TO (2);
+ALTER TABLE ONLY issue_14353 ATTACH PARTITION issue_14353_def DEFAULT;
+INSERT INTO issue_14353 SELECT x, x%3, 'a' FROM generate_series(1, 20)x;
+
+-- Test that the data are successfully copied out and copied in on segment.
+COPY issue_14353 TO   '/tmp/issue_14353_<SEGID>.csv' WITH CSV DELIMITER ',' ON SEGMENT;
+COPY issue_14353 FROM '/tmp/issue_14353_<SEGID>.csv' WITH CSV DELIMITER ',' ON SEGMENT;
+
+-- Test that gpdb emits an error message saying the data distribution is malformed.
+\! cp /tmp/issue_14353_1.csv /tmp/issue_14353_0.csv
+COPY issue_14353 FROM '/tmp/issue_14353_<SEGID>.csv' WITH CSV DELIMITER ',' ON SEGMENT;
+
+-- 2. Test copy a partitioned table with multiple distribution keys on segment.
+CREATE TABLE issue_14353_multi_dist       (a integer, b integer, c text) PARTITION BY RANGE (a) DISTRIBUTED BY (a, c);
+CREATE TABLE issue_14353_multi_dist_prt_1 (b integer, a integer, c text) DISTRIBUTED BY (a, c);
+CREATE TABLE issue_14353_multi_dist_def   (a integer, b integer, c text) DISTRIBUTED BY (a, c);
+
+ALTER TABLE ONLY issue_14353_multi_dist ATTACH PARTITION issue_14353__multi_dist_prt_1 FOR VALUES FROM (1) TO (2);
+ALTER TABLE ONLY issue_14353_multi_dist ATTACH PARTITION issue_14353_multi_dist_def DEFAULT;
+INSERT INTO issue_14353_multi_dist SELECT x, x%3, 'a' || (x%5)::text FROM generate_series(1, 20)x;
+
+-- Test that the data are successfully copied out and copied in on segment.
+COPY issue_14353_multi_dist TO   '/tmp/issue_14353_multi_dist_<SEGID>.csv' WITH CSV DELIMITER ',' ON SEGMENT;
+COPY issue_14353_multi_dist FROM '/tmp/issue_14353_multi_dist_<SEGID>.csv' WITH CSV DELIMITER ',' ON SEGMENT;
+
+-- Test that gpdb emits an error message saying the data distribution is malformed.
+\! cp /tmp/issue_14353_multi_dist_1.csv /tmp/issue_14353_multi_dist_0.csv
+COPY issue_14353_multi_dist FROM '/tmp/issue_14353_multi_dist_<SEGID>.csv' WITH CSV DELIMITER ',' ON SEGMENT;
diff --git a/src/test/regress/output/gpcopy.source b/src/test/regress/output/gpcopy.source
index 0870ce7c41..7840b1eb75 100755
--- a/src/test/regress/output/gpcopy.source
+++ b/src/test/regress/output/gpcopy.source
@@ -1660,3 +1660,37 @@ select * from foo;
  database in COPY TO: funny copy"db'with\\quotes
 (3 rows)
 
+--
+-- Test copy a partitioned table whose columns' orders are not consistent between the root table and partitions.
+--
+-- 1. Test copy a partitioned table with a single distribution key on segment.
+CREATE TABLE issue_14353       (a integer, b integer, c text) PARTITION BY RANGE (a) DISTRIBUTED BY (a);
+CREATE TABLE issue_14353_prt_1 (b integer, a integer, c text) DISTRIBUTED BY (a);
+CREATE TABLE issue_14353_def   (a integer, b integer, c text) DISTRIBUTED BY (a);
+ALTER TABLE ONLY issue_14353 ATTACH PARTITION issue_14353_prt_1 FOR VALUES FROM (1) TO (2);
+ALTER TABLE ONLY issue_14353 ATTACH PARTITION issue_14353_def DEFAULT;
+INSERT INTO issue_14353 SELECT x, x%3, 'a' FROM generate_series(1, 20)x;
+-- Test that the data are successfully copied out and copied in on segment.
+COPY issue_14353 TO   '/tmp/issue_14353_<SEGID>.csv' WITH CSV DELIMITER ',' ON SEGMENT;
+COPY issue_14353 FROM '/tmp/issue_14353_<SEGID>.csv' WITH CSV DELIMITER ',' ON SEGMENT;
+-- Test that gpdb emits an error message saying the data distribution is malformed.
+\! cp /tmp/issue_14353_1.csv /tmp/issue_14353_0.csv
+COPY issue_14353 FROM '/tmp/issue_14353_<SEGID>.csv' WITH CSV DELIMITER ',' ON SEGMENT;
+ERROR:  value of distribution key doesn't belong to segment with ID 0, it belongs to segment with ID 1  (seg0 127.0.0.1:7002 pid=16166)
+CONTEXT:  COPY issue_14353, line 17: "1,1,a"
+-- 2. Test copy a partitioned table with multiple distribution keys on segment.
+CREATE TABLE issue_14353_multi_dist       (a integer, b integer, c text) PARTITION BY RANGE (a) DISTRIBUTED BY (a, c);
+CREATE TABLE issue_14353_multi_dist_prt_1 (b integer, a integer, c text) DISTRIBUTED BY (a, c);
+CREATE TABLE issue_14353_multi_dist_def   (a integer, b integer, c text) DISTRIBUTED BY (a, c);
+ALTER TABLE ONLY issue_14353_multi_dist ATTACH PARTITION issue_14353__multi_dist_prt_1 FOR VALUES FROM (1) TO (2);
+ERROR:  relation "issue_14353__multi_dist_prt_1" does not exist
+ALTER TABLE ONLY issue_14353_multi_dist ATTACH PARTITION issue_14353_multi_dist_def DEFAULT;
+INSERT INTO issue_14353_multi_dist SELECT x, x%3, 'a' || (x%5)::text FROM generate_series(1, 20)x;
+-- Test that the data are successfully copied out and copied in on segment.
+COPY issue_14353_multi_dist TO   '/tmp/issue_14353_multi_dist_<SEGID>.csv' WITH CSV DELIMITER ',' ON SEGMENT;
+COPY issue_14353_multi_dist FROM '/tmp/issue_14353_multi_dist_<SEGID>.csv' WITH CSV DELIMITER ',' ON SEGMENT;
+-- Test that gpdb emits an error message saying the data distribution is malformed.
+\! cp /tmp/issue_14353_multi_dist_1.csv /tmp/issue_14353_multi_dist_0.csv
+COPY issue_14353_multi_dist FROM '/tmp/issue_14353_multi_dist_<SEGID>.csv' WITH CSV DELIMITER ',' ON SEGMENT;
+ERROR:  value of distribution key doesn't belong to segment with ID 0, it belongs to segment with ID 1  (seg0 127.0.0.1:7002 pid=21933)
+CONTEXT:  COPY issue_14353_multi_dist, line 11: "1,1,a"


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org


(cloudberry) 01/07: ao/co index build scans: Only use SnapshotAny

Posted by yj...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yjhjstz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git

commit b6e9971f2aebb63dd1a9cc025a8ab286ea43c7b6
Author: Soumyadeep Chakraborty <so...@gmail.com>
AuthorDate: Mon Nov 7 09:53:45 2022 -0800

    ao/co index build scans: Only use SnapshotAny
    
    We can simply use SnapshotAny for AO/CO index build scans because:
    i)  We don't support concurrent index builds on AO/CO tables.
    ii) No AO/CO tables are created during bootstrap.
---
 src/backend/access/aocs/aocsam_handler.c           | 48 ++--------------------
 .../access/appendonly/appendonlyam_handler.c       | 47 ++-------------------
 2 files changed, 6 insertions(+), 89 deletions(-)

diff --git a/src/backend/access/aocs/aocsam_handler.c b/src/backend/access/aocs/aocsam_handler.c
index 78d0248a48..6b6a76b482 100644
--- a/src/backend/access/aocs/aocsam_handler.c
+++ b/src/backend/access/aocs/aocsam_handler.c
@@ -1696,8 +1696,6 @@ aoco_index_build_range_scan(Relation heapRelation,
 	EState	   *estate;
 	ExprContext *econtext;
 	Snapshot	snapshot;
-	bool		need_unregister_snapshot = false;
-	TransactionId OldestXmin;
 	AOCSFileSegInfo **seginfo = NULL;
 	int32 segfile_count;
 	int64 total_blockcount = 0; 
@@ -1743,34 +1741,15 @@ aoco_index_build_range_scan(Relation heapRelation,
 	/* Set up execution state for predicate, if any. */
 	predicate = ExecPrepareQual(indexInfo->ii_Predicate, estate);
 
-	/*
-	 * Prepare for scan of the base relation.  In a normal index build, we use
-	 * SnapshotAny because we must retrieve all tuples and do our own time
-	 * qual checks (because we have to index RECENTLY_DEAD tuples). In a
-	 * concurrent build, or during bootstrap, we take a regular MVCC snapshot
-	 * and index whatever's live according to that.
-	 */
-	OldestXmin = InvalidTransactionId;
-
-	/* okay to ignore lazy VACUUMs here */
-	if (!IsBootstrapProcessingMode() && !indexInfo->ii_Concurrent)
-		OldestXmin = GetOldestNonRemovableTransactionId(heapRelation);
-
 	if (!scan)
 	{
 		/*
 		 * Serial index build.
 		 *
-		 * Must begin our own heap scan in this case.  We may also need to
-		 * register a snapshot whose lifetime is under our direct control.
+		 * XXX: We always use SnapshotAny here. An MVCC snapshot and oldest xmin
+		 * calculation is necessary to support indexes built CONCURRENTLY.
 		 */
-		if (!TransactionIdIsValid(OldestXmin))
-		{
-			snapshot = RegisterSnapshot(GetTransactionSnapshot());
-			need_unregister_snapshot = true;
-		}
-		else
-			snapshot = SnapshotAny;
+		snapshot = SnapshotAny;
 
 		scan = table_beginscan_strat(heapRelation,	/* relation */
 		                             snapshot,	/* snapshot */
@@ -1864,23 +1843,6 @@ aoco_index_build_range_scan(Relation heapRelation,
 									total_blockcount);
 	}
 
-
-	/*
-	* GPDB_14_MERGE_FIXME
-	* Same as in appendonly_handler.c:
-	* Need to check the comments here as GetOldestXmin() has been removed.
-	*/
-	/*
-	 * Must call GetOldestXmin() with SnapshotAny.  Should never call
-	 * GetOldestXmin() with MVCC snapshot. (It's especially worth checking
-	 * this for parallel builds, since ambuild routines that support parallel
-	 * builds must work these details out for themselves.)
-	 */
-	Assert(snapshot == SnapshotAny || IsMVCCSnapshot(snapshot));
-	Assert(snapshot == SnapshotAny ? TransactionIdIsValid(OldestXmin) :
-	       !TransactionIdIsValid(OldestXmin));
-	Assert(snapshot == SnapshotAny || !anyvisible);
-
 	/* set our scan endpoints */
 	if (!allow_sync)
 	{
@@ -2006,10 +1968,6 @@ aoco_index_build_range_scan(Relation heapRelation,
 
 	table_endscan(scan);
 
-	/* we can now forget our snapshot, if set and registered by us */
-	if (need_unregister_snapshot)
-		UnregisterSnapshot(snapshot);
-
 	ExecDropSingleTupleTableSlot(slot);
 
 	FreeExecutorState(estate);
diff --git a/src/backend/access/appendonly/appendonlyam_handler.c b/src/backend/access/appendonly/appendonlyam_handler.c
index 9e9d5ebc66..a80e06f73d 100644
--- a/src/backend/access/appendonly/appendonlyam_handler.c
+++ b/src/backend/access/appendonly/appendonlyam_handler.c
@@ -1567,8 +1567,6 @@ appendonly_index_build_range_scan(Relation heapRelation,
 	EState	   *estate;
 	ExprContext *econtext;
 	Snapshot	snapshot;
-	bool		need_unregister_snapshot = false;
-	TransactionId OldestXmin;
 	FileSegInfo **seginfo = NULL;
 	int segfile_count;
 	int64 total_blockcount = 0;
@@ -1612,35 +1610,15 @@ appendonly_index_build_range_scan(Relation heapRelation,
 	/* Set up execution state for predicate, if any. */
 	predicate = ExecPrepareQual(indexInfo->ii_Predicate, estate);
 
-	/*
-	 * Prepare for scan of the base relation.  In a normal index build, we use
-	 * SnapshotAny because we must retrieve all tuples and do our own time
-	 * qual checks (because we have to index RECENTLY_DEAD tuples). In a
-	 * concurrent build, or during bootstrap, we take a regular MVCC snapshot
-	 * and index whatever's live according to that.
-	 */
-	OldestXmin = InvalidTransactionId;
-
-	/* okay to ignore lazy VACUUMs here */
-	if (!IsBootstrapProcessingMode() && !indexInfo->ii_Concurrent)
-		OldestXmin = GetOldestNonRemovableTransactionId(heapRelation);
-
 	if (!scan)
 	{
 		/*
 		 * Serial index build.
 		 *
-		 * Must begin our own heap scan in this case.  We may also need to
-		 * register a snapshot whose lifetime is under our direct control.
+		 * XXX: We always use SnapshotAny here. An MVCC snapshot and oldest xmin
+		 * calculation is necessary to support indexes built CONCURRENTLY.
 		 */
-		if (!TransactionIdIsValid(OldestXmin))
-		{
-			snapshot = RegisterSnapshot(GetTransactionSnapshot());
-			need_unregister_snapshot = true;
-		}
-		else
-			snapshot = SnapshotAny;
-
+		snapshot = SnapshotAny;
 		scan = table_beginscan_strat(heapRelation,	/* relation */
 									 snapshot,	/* snapshot */
 									 0, /* number of keys */
@@ -1708,21 +1686,6 @@ appendonly_index_build_range_scan(Relation heapRelation,
 		pgstat_progress_update_param(PROGRESS_SCAN_BLOCKS_TOTAL, total_blockcount);
 	}
 
-	/*
-	* GPDB_14_MERGE_FIXME
-	* Need to check the comments here as GetOldestXmin() has been removed.
-	*/
-	/*
-	 * Must call GetOldestXmin() with SnapshotAny.  Should never call
-	 * GetOldestXmin() with MVCC snapshot. (It's especially worth checking
-	 * this for parallel builds, since ambuild routines that support parallel
-	 * builds must work these details out for themselves.)
-	 */
-	Assert(snapshot == SnapshotAny || IsMVCCSnapshot(snapshot));
-	Assert(snapshot == SnapshotAny ? TransactionIdIsValid(OldestXmin) :
-		   !TransactionIdIsValid(OldestXmin));
-	Assert(snapshot == SnapshotAny || !anyvisible);
-
 	/* set our scan endpoints */
 	if (!allow_sync)
 	{
@@ -1828,10 +1791,6 @@ appendonly_index_build_range_scan(Relation heapRelation,
 
 	table_endscan(scan);
 
-	/* we can now forget our snapshot, if set and registered by us */
-	if (need_unregister_snapshot)
-		UnregisterSnapshot(snapshot);
-
 	ExecDropSingleTupleTableSlot(slot);
 
 	FreeExecutorState(estate);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org


(cloudberry) 06/07: Move stats related tests under disable_autovacuum for validity of index's reltuples.

Posted by yj...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yjhjstz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git

commit d71f6160828dc5467e90e7999673eeef075d9bd6
Author: Haolin Wang <wh...@vmware.com>
AuthorDate: Fri Aug 19 14:06:04 2022 +0800

    Move stats related tests under disable_autovacuum for validity of index's reltuples.
    
    This is intended to fix flaky cases introduced by VACUUM index
    enhancement on AO PR https://github.com/greenplum-db/gpdb/pull/13255.
    
    As the new VACUUM strategy cleaning up index dead tuples isn't based on
    visibility map checking any more, there might be more index->reltuples
    to be counted in the case of concurrent AUTOVACUUM/AUTOANALYZE(for sampling
    the stats of user tables) being reading the same table result in dead tuples
    deletion skipped. So move impact tests under disable_autovacuum for validity
    of stats on index->reltuples.
---
 src/test/regress/greenplum_schedule | 27 +++++++++++++++------------
 1 file changed, 15 insertions(+), 12 deletions(-)

diff --git a/src/test/regress/greenplum_schedule b/src/test/regress/greenplum_schedule
index d1861f680b..095e4316d8 100755
--- a/src/test/regress/greenplum_schedule
+++ b/src/test/regress/greenplum_schedule
@@ -208,23 +208,13 @@ ignore: tpch500GB_orca
 
 # Tests for "compaction", i.e. VACUUM, of updatable append-only tables
 test: uao_compaction/full uao_compaction/outdated_partialindex uao_compaction/drop_column_update uao_compaction/eof_truncate uao_compaction/basic uao_compaction/outdatedindex uao_compaction/update_toast uao_compaction/outdatedindex_abort uao_compaction/delete_toast uao_compaction/alter_table_analyze uao_compaction/full_eof_truncate uao_compaction/full_threshold
-# TODO find why these tests fail in parallel, for now keeping them sequential
-test: uao_compaction/full_stats
-test: uao_compaction/stats
-test: uao_compaction/index_stats
+
 test: uao_compaction/index
-test: uao_compaction/drop_column
 test: uao_compaction/index2
-
+test: uaocs_compaction/index
 
 # Tests for "compaction", i.e. VACUUM, of updatable append-only column oriented tables
 test: uaocs_compaction/alter_table_analyze uaocs_compaction/basic uaocs_compaction/drop_column_update uaocs_compaction/eof_truncate uaocs_compaction/full uaocs_compaction/full_eof_truncate uaocs_compaction/full_threshold uaocs_compaction/outdated_partialindex uaocs_compaction/outdatedindex uaocs_compaction/outdatedindex_abort
-# TODO find why these tests fail in parallel, for now keeping them sequential
-test: uaocs_compaction/full_stats
-test: uaocs_compaction/stats
-test: uaocs_compaction/index_stats
-test: uaocs_compaction/index
-test: uaocs_compaction/drop_column
 
 test: uao_ddl/cursor_row uao_ddl/cursor_column uao_ddl/alter_ao_table_statistics_row uao_ddl/alter_ao_table_statistics_column uao_ddl/alter_ao_table_setdefault_row uao_ddl/alter_ao_table_index_row uao_ddl/alter_ao_table_owner_column uao_ddl/spgist_over_ao_table_row
 test: uao_ddl/alter_ao_table_owner_row uao_ddl/alter_ao_table_setstorage_row uao_ddl/alter_ao_table_constraint_row uao_ddl/alter_ao_table_constraint_column uao_ddl/alter_ao_table_index_column uao_ddl/blocksize_row uao_ddl/compresstype_column uao_ddl/alter_ao_table_setdefault_column uao_ddl/blocksize_column uao_ddl/temp_on_commit_delete_rows_row uao_ddl/temp_on_commit_delete_rows_column uao_ddl/spgist_over_ao_table_column
@@ -243,6 +233,19 @@ test: ao_unique_index_partition
 
 # disable autovacuum for the test
 test: disable_autovacuum
+# These cases need to run without autovacuum, as it acquiring ShareUpdateExclusiveLock
+# on table which does matter concurrent VACUUM stats on reltuples calculation.
+# TODO find why these tests fail in parallel, for now keeping them sequential
+test: uao_compaction/full_stats
+test: uao_compaction/stats
+test: uao_compaction/index_stats
+test: uao_compaction/drop_column
+# TODO find why these tests fail in parallel, for now keeping them sequential
+test: uaocs_compaction/full_stats
+test: uaocs_compaction/stats
+test: uaocs_compaction/index_stats
+test: uaocs_compaction/drop_column
+
 # Run uao[cs]_catalog_tables separately. They run VACUUM FULL on
 # append-optimized tables and assume that no AWAITING_DROP segfiles exist at
 # the end of VACUUM FULL.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org