From 53d1d50f1ded1131b8ae258f33a3686cb255457b Mon Sep 17 00:00:00 2001 From: Jinbao Chen Date: Fri, 24 Apr 2026 12:46:29 -0400 Subject: [PATCH 1/2] Fix some answer files --- .../parallel_retrieve_cursor/explain.source | 19 ++++++++----------- .../regress/expected/partition_append.out | 18 +++++++++++------- src/test/regress/sql/partition_append.sql | 4 ++++ 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/src/test/isolation2/output/parallel_retrieve_cursor/explain.source b/src/test/isolation2/output/parallel_retrieve_cursor/explain.source index 15baecb724f..aa2c65ac65b 100644 --- a/src/test/isolation2/output/parallel_retrieve_cursor/explain.source +++ b/src/test/isolation2/output/parallel_retrieve_cursor/explain.source @@ -129,17 +129,14 @@ EXPLAIN (VERBOSE, COSTS false) DECLARE c1 PARALLEL RETRIEVE CURSOR FOR SELECT * Optimizer: Postgres query optimizer (5 rows) EXPLAIN (VERBOSE, COSTS false) DECLARE c1 PARALLEL RETRIEVE CURSOR FOR SELECT * FROM pg_class ORDER BY relname; - QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Sort - Output: oid, relname, relnamespace, reltype, reloftype, relowner, relam, relfilenode, reltablespace, relpages, reltuples, relallvisible, reltoastrelid, relhasindex, relisshared, relpersistence, relkind, relnatts, relchecks, relhasrules, relhastriggers, relhassubclass, relrowsecurity, relforcerowsecurity, relispopulated, relreplident, relispartition, relisivm, relisdynamic, relmvrefcount, relrewrite, relfrozenxid, relminmxid, relacl, reloptions, relpartbound - Sort Key: pg_class.relname - -> Seq Scan on pg_catalog.pg_class - Output: oid, relname, relnamespace, reltype, reloftype, relowner, relam, relfilenode, reltablespace, relpages, reltuples, relallvisible, reltoastrelid, relhasindex, relisshared, relpersistence, relkind, relnatts, relchecks, relhasrules, relhastriggers, relhassubclass, relrowsecurity, relforcerowsecurity, relispopulated, relreplident, relispartition, relisivm, relisdynamic, relmvrefcount, relrewrite, relfrozenxid, relminmxid, relacl, reloptions, relpartbound - Settings: enable_incremental_sort = 'on' - Endpoint: "on coordinator" - Optimizer: Postgres query optimizer -(8 rows) + QUERY PLAN +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Index Scan using pg_class_relname_nsp_index on pg_catalog.pg_class + Output: oid, relname, relnamespace, reltype, reloftype, relowner, relam, relfilenode, reltablespace, relpages, reltuples, relallvisible, reltoastrelid, relhasindex, relisshared, relpersistence, relkind, relnatts, relchecks, relhasrules, relhastriggers, relhassubclass, relrowsecurity, relforcerowsecurity, relispopulated, relreplident, relispartition, relisivm, relisdynamic, relmvrefcount, relrewrite, relfrozenxid, relminmxid, relacl, reloptions, relpartbound + Settings: optimizer = 'off', enable_incremental_sort = 'on' + Endpoint: "on coordinator" + Optimizer: Postgres query optimizer +(5 rows) EXPLAIN (VERBOSE, COSTS false) DECLARE c1 PARALLEL RETRIEVE CURSOR FOR SELECT * FROM pg_class WHERE gp_segment_id=1; QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ diff --git a/src/test/regress/expected/partition_append.out b/src/test/regress/expected/partition_append.out index fff341d680a..9154c7d5a6b 100755 --- a/src/test/regress/expected/partition_append.out +++ b/src/test/regress/expected/partition_append.out @@ -161,6 +161,7 @@ ERROR: child table is missing column "b" -- different owner create role part_role_append; NOTICE: resource queue required -- using default resource queue "pg_default" +GRANT CREATE ON SCHEMA public TO part_role_append; create table bar_p (i int, j int) distributed by (i); set session authorization part_role_append; -- should fail @@ -196,6 +197,7 @@ alter table foo_p split partition for (1) at (2) into (partition prt_11, partiti (4 rows) drop table foo_p; +REVOKE CREATE ON SCHEMA public FROM part_role_append; drop role part_role_append; -- WITH OIDS is no longer supported. Check that it't rejected with the GPDB -- partitioning syntax, too. @@ -5726,6 +5728,13 @@ select relname, relkind from pg_class where relkind in ('r', 'p') and relname li select gp_segment_id, relname, relkind from gp_dist_random('pg_class') where relkind in ('r', 'p') and relname like 'sales%' and relfrozenxid=0; gp_segment_id | relname | relkind ---------------+----------------------------+--------- + 2 | sales | p + 2 | sales | p + 2 | sales_1_prt_2 | p + 2 | sales_1_prt_3 | p + 2 | sales_1_prt_4 | p + 2 | sales_1_prt_5 | p + 2 | sales_1_prt_outlying_dates | p 0 | sales | p 0 | sales | p 0 | sales_1_prt_2 | p @@ -5740,13 +5749,6 @@ select gp_segment_id, relname, relkind from gp_dist_random('pg_class') where rel 1 | sales_1_prt_4 | p 1 | sales_1_prt_5 | p 1 | sales_1_prt_outlying_dates | p - 2 | sales | p - 2 | sales | p - 2 | sales_1_prt_2 | p - 2 | sales_1_prt_3 | p - 2 | sales_1_prt_4 | p - 2 | sales_1_prt_5 | p - 2 | sales_1_prt_outlying_dates | p (21 rows) alter table sales drop column tax; @@ -6176,6 +6178,7 @@ DROP TABLE unexpanded_attach2; -- set owner for partition root (should be inherited except for ATTACH, EXCHANGE) CREATE ROLE part_inherit_role CREATEROLE; NOTICE: resource queue required -- using default resource queue "pg_default" +GRANT CREATE ON SCHEMA public TO part_inherit_role; CREATE ROLE part_inherit_other_role IN ROLE part_inherit_role; NOTICE: resource queue required -- using default resource queue "pg_default" CREATE ROLE part_inherit_priv_role; @@ -6438,6 +6441,7 @@ RESET ROLE; DROP TABLE part_inherit; DROP FUNCTION part_inherit_trig CASCADE; DROP TABLE part_inherit_exchange_out; +REVOKE CREATE ON SCHEMA public FROM part_inherit_role; DROP ROLE part_inherit_role; DROP ROLE part_inherit_other_role; DROP ROLE part_inherit_priv_role; diff --git a/src/test/regress/sql/partition_append.sql b/src/test/regress/sql/partition_append.sql index 7cb3a3ba062..9a59e5c2862 100644 --- a/src/test/regress/sql/partition_append.sql +++ b/src/test/regress/sql/partition_append.sql @@ -117,6 +117,7 @@ ALTER TABLE two_level_pt ALTER PARTITION FOR (1) -- different owner create role part_role_append; +GRANT CREATE ON SCHEMA public TO part_role_append; create table bar_p (i int, j int) distributed by (i); set session authorization part_role_append; -- should fail @@ -145,6 +146,7 @@ alter table foo_p split partition for (1) at (2) into (partition prt_11, partiti \dt foo_* drop table foo_p; +REVOKE CREATE ON SCHEMA public FROM part_role_append; drop role part_role_append; -- WITH OIDS is no longer supported. Check that it't rejected with the GPDB @@ -3888,6 +3890,7 @@ DROP TABLE unexpanded_attach2; -- -- set owner for partition root (should be inherited except for ATTACH, EXCHANGE) CREATE ROLE part_inherit_role CREATEROLE; +GRANT CREATE ON SCHEMA public TO part_inherit_role; CREATE ROLE part_inherit_other_role IN ROLE part_inherit_role; CREATE ROLE part_inherit_priv_role; CREATE ROLE part_inherit_attach_priv_role; @@ -4090,6 +4093,7 @@ RESET ROLE; DROP TABLE part_inherit; DROP FUNCTION part_inherit_trig CASCADE; DROP TABLE part_inherit_exchange_out; +REVOKE CREATE ON SCHEMA public FROM part_inherit_role; DROP ROLE part_inherit_role; DROP ROLE part_inherit_other_role; DROP ROLE part_inherit_priv_role; From e1ef703f15feeafcc5cca6e71e00b65ef4067a57 Mon Sep 17 00:00:00 2001 From: Jinbao Chen Date: Sat, 25 Apr 2026 11:19:51 -0400 Subject: [PATCH 2/2] test --- src/test/regress/expected/directory_table.out | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/regress/expected/directory_table.out b/src/test/regress/expected/directory_table.out index 0ca11409824..207ed2a7022 100644 --- a/src/test/regress/expected/directory_table.out +++ b/src/test/regress/expected/directory_table.out @@ -788,7 +788,7 @@ ERROR: duplicate key value violates unique constraint "dir_table1_pkey" DETAIL: Key (relative_path)=(nation1) already exists. COPY BINARY dir_table1 FROM :'nation_file' 'nation2' 'nation2'; -- fail ERROR: syntax error at or near "'nation2'" -LINE 1: ...rrydb/src/test/regress/data/nation.csv' 'nation2' 'nation2'; +LINE 1: ...berry/src/test/regress/data/nation.csv' 'nation2' 'nation2'; ^ COPY BINARY dir_table1 FROM :'nation_file' 'nation2'; NOTICE: dir_table1 INSERT AFTER ROW (seg2 127.0.1.1:7004 pid=900444)