Fix flakyness

issue/6694
Gokhan Gulbiz 2023-02-28 16:10:31 +03:00
parent 08bf877d29
commit cd69b975a3
No known key found for this signature in database
GPG Key ID: 608EF06B6BD1B45B
3 changed files with 17 additions and 14 deletions

View File

@ -161,11 +161,11 @@ SET search_path TO generated_identities;
SET client_min_messages to ERROR; SET client_min_messages to ERROR;
INSERT INTO partitioned_table (c) INSERT INTO partitioned_table (c)
SELECT s FROM generate_series(10,20) s; SELECT s FROM generate_series(10,20) s;
INSERT INTO partitioned_table (a,b,c) VALUES (999,999,999); INSERT INTO partitioned_table (a,b,c) VALUES (997,997,997);
ERROR: cannot insert a non-DEFAULT value into column "b" ERROR: cannot insert a non-DEFAULT value into column "b"
DETAIL: Column "b" is an identity column defined as GENERATED ALWAYS. DETAIL: Column "b" is an identity column defined as GENERATED ALWAYS.
HINT: Use OVERRIDING SYSTEM VALUE to override. HINT: Use OVERRIDING SYSTEM VALUE to override.
INSERT INTO partitioned_table (a,c) VALUES (999,999); INSERT INTO partitioned_table (a,c) VALUES (998,998);
INSERT INTO partitioned_table (a,b,c) OVERRIDING SYSTEM VALUE VALUES (999,999,999); INSERT INTO partitioned_table (a,b,c) OVERRIDING SYSTEM VALUE VALUES (999,999,999);
SELECT * FROM partitioned_table ORDER BY c ASC; SELECT * FROM partitioned_table ORDER BY c ASC;
a | b | c a | b | c
@ -188,7 +188,7 @@ SELECT * FROM partitioned_table ORDER BY c ASC;
90 | 90 | 18 90 | 90 | 18
100 | 100 | 19 100 | 100 | 19
110 | 110 | 20 110 | 110 | 20
999 | 120 | 999 998 | 120 | 998
999 | 999 | 999 999 | 999 | 999
(20 rows) (20 rows)
@ -294,10 +294,10 @@ SELECT create_distributed_table('color', 'color_id');
(1 row) (1 row)
CREATE USER test; CREATE USER identity_test_user;
GRANT INSERT ON color TO test; GRANT INSERT ON color TO identity_test_user;
GRANT USAGE ON SCHEMA generated_identities TO test; GRANT USAGE ON SCHEMA generated_identities TO identity_test_user;
\c - test - :worker_1_port \c - identity_test_user - :worker_1_port
SET search_path TO generated_identities; SET search_path TO generated_identities;
SET client_min_messages to ERROR; SET client_min_messages to ERROR;
INSERT INTO color(color_name) VALUES ('Blue'); INSERT INTO color(color_name) VALUES ('Blue');
@ -305,3 +305,4 @@ INSERT INTO color(color_name) VALUES ('Blue');
SET search_path TO generated_identities; SET search_path TO generated_identities;
SET client_min_messages to ERROR; SET client_min_messages to ERROR;
DROP SCHEMA generated_identities CASCADE; DROP SCHEMA generated_identities CASCADE;
DROP USER identity_test_user;

View File

@ -248,6 +248,7 @@ ORDER BY 1;
function worker_fix_pre_citus10_partitioned_table_constraint_names(regclass,bigint,text) function worker_fix_pre_citus10_partitioned_table_constraint_names(regclass,bigint,text)
function worker_hash("any") function worker_hash("any")
function worker_last_saved_explain_analyze() function worker_last_saved_explain_analyze()
function worker_modify_identity_columns(regclass)
function worker_nextval(regclass) function worker_nextval(regclass)
function worker_partial_agg(oid,anyelement) function worker_partial_agg(oid,anyelement)
function worker_partial_agg_ffunc(internal) function worker_partial_agg_ffunc(internal)
@ -318,5 +319,5 @@ ORDER BY 1;
view citus_stat_statements view citus_stat_statements
view pg_dist_shard_placement view pg_dist_shard_placement
view time_partitions view time_partitions
(310 rows) (311 rows)

View File

@ -98,9 +98,9 @@ SET client_min_messages to ERROR;
INSERT INTO partitioned_table (c) INSERT INTO partitioned_table (c)
SELECT s FROM generate_series(10,20) s; SELECT s FROM generate_series(10,20) s;
INSERT INTO partitioned_table (a,b,c) VALUES (999,999,999); INSERT INTO partitioned_table (a,b,c) VALUES (997,997,997);
INSERT INTO partitioned_table (a,c) VALUES (999,999); INSERT INTO partitioned_table (a,c) VALUES (998,998);
INSERT INTO partitioned_table (a,b,c) OVERRIDING SYSTEM VALUE VALUES (999,999,999); INSERT INTO partitioned_table (a,b,c) OVERRIDING SYSTEM VALUE VALUES (999,999,999);
@ -154,11 +154,11 @@ CREATE TABLE color (
); );
SELECT create_distributed_table('color', 'color_id'); SELECT create_distributed_table('color', 'color_id');
CREATE USER test; CREATE USER identity_test_user;
GRANT INSERT ON color TO test; GRANT INSERT ON color TO identity_test_user;
GRANT USAGE ON SCHEMA generated_identities TO test; GRANT USAGE ON SCHEMA generated_identities TO identity_test_user;
\c - test - :worker_1_port \c - identity_test_user - :worker_1_port
SET search_path TO generated_identities; SET search_path TO generated_identities;
SET client_min_messages to ERROR; SET client_min_messages to ERROR;
@ -169,3 +169,4 @@ SET search_path TO generated_identities;
SET client_min_messages to ERROR; SET client_min_messages to ERROR;
DROP SCHEMA generated_identities CASCADE; DROP SCHEMA generated_identities CASCADE;
DROP USER identity_test_user;