From 11072b4cb8980e5580a66a1f345fc1c61f477986 Mon Sep 17 00:00:00 2001 From: Halil Ozan Akgul Date: Tue, 30 Nov 2021 12:46:22 +0300 Subject: [PATCH 1/2] Normalize create role command in drop_partitioned_table test --- .../regress/expected/drop_partitioned_table.out | 14 ++++++-------- src/test/regress/sql/drop_partitioned_table.sql | 6 ++---- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/test/regress/expected/drop_partitioned_table.out b/src/test/regress/expected/drop_partitioned_table.out index 17ebb5e97..b77e6f80b 100644 --- a/src/test/regress/expected/drop_partitioned_table.out +++ b/src/test/regress/expected/drop_partitioned_table.out @@ -147,18 +147,16 @@ SET search_path = drop_partitioned_table; SET citus.next_shard_id TO 723000; -- CASE 3 -- DROP OWNED BY role1; Only parent is owned by role1, children are owned by another owner -SET client_min_messages TO warning; -SET citus.enable_ddl_propagation TO off; +SET client_min_messages TO ERROR; CREATE ROLE role1; -RESET client_min_messages; -RESET citus.enable_ddl_propagation; -SELECT run_command_on_workers('CREATE ROLE role1'); - run_command_on_workers +SELECT 1 FROM run_command_on_workers('CREATE ROLE role1'); + ?column? --------------------------------------------------------------------- - (localhost,57637,t,"CREATE ROLE") - (localhost,57638,t,"CREATE ROLE") + 1 + 1 (2 rows) +RESET client_min_messages; GRANT ALL ON SCHEMA drop_partitioned_table TO role1; SET ROLE role1; CREATE TABLE drop_partitioned_table.parent (x text, t timestamptz DEFAULT now()) PARTITION BY RANGE (t); diff --git a/src/test/regress/sql/drop_partitioned_table.sql b/src/test/regress/sql/drop_partitioned_table.sql index e5eb7dc23..a3d5e9752 100644 --- a/src/test/regress/sql/drop_partitioned_table.sql +++ b/src/test/regress/sql/drop_partitioned_table.sql @@ -117,12 +117,10 @@ SET citus.next_shard_id TO 723000; -- CASE 3 -- DROP OWNED BY role1; Only parent is owned by role1, children are owned by another owner -SET client_min_messages TO warning; -SET citus.enable_ddl_propagation TO off; +SET client_min_messages TO ERROR; CREATE ROLE role1; +SELECT 1 FROM run_command_on_workers('CREATE ROLE role1'); RESET client_min_messages; -RESET citus.enable_ddl_propagation; -SELECT run_command_on_workers('CREATE ROLE role1'); GRANT ALL ON SCHEMA drop_partitioned_table TO role1; SET ROLE role1; CREATE TABLE drop_partitioned_table.parent (x text, t timestamptz DEFAULT now()) PARTITION BY RANGE (t); From 316274b5f0b135f0a2e49ad6d2125a39dd6162ff Mon Sep 17 00:00:00 2001 From: Halil Ozan Akgul Date: Tue, 30 Nov 2021 13:22:06 +0300 Subject: [PATCH 2/2] Add normalize.sed item for multi_fix_partition_shard_index_names test --- src/test/regress/bin/normalize.sed | 2 ++ .../expected/multi_fix_partition_shard_index_names.out | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/test/regress/bin/normalize.sed b/src/test/regress/bin/normalize.sed index f9184da14..d4a0db225 100644 --- a/src/test/regress/bin/normalize.sed +++ b/src/test/regress/bin/normalize.sed @@ -251,3 +251,5 @@ s/CREATE TABLESPACE test_tablespace LOCATION.*/CREATE TABLESPACE test_tablespace # columnar log for var correlation s/(.*absolute correlation \()([0,1]\.[0-9]+)(\) of var attribute [0-9]+ is smaller than.*)/\1X\.YZ\3/g + +s/NOTICE: issuing WITH placement_data\(shardid, shardstate, shardlength, groupid, placementid\) AS \(VALUES \([0-9]+, [0-9]+, [0-9]+, [0-9]+, [0-9]+\)\)/NOTICE: issuing WITH placement_data\(shardid, shardstate, shardlength, groupid, placementid\) AS \(VALUES \(xxxxxx, xxxxxx, xxxxxx, xxxxxx, xxxxxx\)\)/g diff --git a/src/test/regress/expected/multi_fix_partition_shard_index_names.out b/src/test/regress/expected/multi_fix_partition_shard_index_names.out index 466d39c31..f22226d7f 100644 --- a/src/test/regress/expected/multi_fix_partition_shard_index_names.out +++ b/src/test/regress/expected/multi_fix_partition_shard_index_names.out @@ -682,9 +682,9 @@ NOTICE: issuing WITH shard_data(relationname, shardid, storagetype, shardminval DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx NOTICE: issuing WITH shard_data(relationname, shardid, storagetype, shardminvalue, shardmaxvalue) AS (VALUES ('fix_idx_names.p2'::regclass, 915002, 't'::"char", '-2147483648', '2147483647')) SELECT citus_internal_add_shard_metadata(relationname, shardid, storagetype, shardminvalue, shardmaxvalue) FROM shard_data; DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx -NOTICE: issuing WITH placement_data(shardid, shardstate, shardlength, groupid, placementid) AS (VALUES (915002, 1, 0, 1, 3380)) SELECT citus_internal_add_placement_metadata(shardid, shardstate, shardlength, groupid, placementid) FROM placement_data; +NOTICE: issuing WITH placement_data(shardid, shardstate, shardlength, groupid, placementid) AS (VALUES (xxxxxx, xxxxxx, xxxxxx, xxxxxx, xxxxxx)) SELECT citus_internal_add_placement_metadata(shardid, shardstate, shardlength, groupid, placementid) FROM placement_data; DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx -NOTICE: issuing WITH placement_data(shardid, shardstate, shardlength, groupid, placementid) AS (VALUES (915002, 1, 0, 1, 3380)) SELECT citus_internal_add_placement_metadata(shardid, shardstate, shardlength, groupid, placementid) FROM placement_data; +NOTICE: issuing WITH placement_data(shardid, shardstate, shardlength, groupid, placementid) AS (VALUES (xxxxxx, xxxxxx, xxxxxx, xxxxxx, xxxxxx)) SELECT citus_internal_add_placement_metadata(shardid, shardstate, shardlength, groupid, placementid) FROM placement_data; DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx NOTICE: issuing SET citus.enable_ddl_propagation TO 'off' DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx