Fix flaky test

pull/5209/head
Onder Kalaci 2021-09-02 09:27:14 +02:00 committed by Sait Talha Nisanci
parent 5844ab286c
commit 82a3b20fb3
2 changed files with 7 additions and 7 deletions

View File

@ -360,7 +360,7 @@ SELECT create_distributed_table('referencing_dist_table', 'a', colocate_with:='r
SET client_min_messages TO WARNING;
SELECT conrelid::regclass::text AS "Referencing Table", pg_get_constraintdef(oid, true) AS "Definition" FROM pg_constraint
WHERE (conrelid::regclass::text = 'table_with_references' OR confrelid::regclass::text = 'table_with_references') AND contype = 'f' ORDER BY 1;
WHERE (conrelid::regclass::text = 'table_with_references' OR confrelid::regclass::text = 'table_with_references') AND contype = 'f' ORDER BY 1,2;
Referencing Table | Definition
---------------------------------------------------------------------
referencing_dist_table | FOREIGN KEY (a) REFERENCES table_with_references(a1)
@ -375,12 +375,12 @@ SELECT alter_distributed_table('table_with_references', shard_count := 12, casca
(1 row)
SELECT conrelid::regclass::text AS "Referencing Table", pg_get_constraintdef(oid, true) AS "Definition" FROM pg_constraint
WHERE (conrelid::regclass::text = 'table_with_references' OR confrelid::regclass::text = 'table_with_references') AND contype = 'f' ORDER BY 1;
WHERE (conrelid::regclass::text = 'table_with_references' OR confrelid::regclass::text = 'table_with_references') AND contype = 'f' ORDER BY 1,2;
Referencing Table | Definition
---------------------------------------------------------------------
referencing_dist_table | FOREIGN KEY (a) REFERENCES table_with_references(a1)
table_with_references | FOREIGN KEY (a2) REFERENCES referenced_ref_table(a)
table_with_references | FOREIGN KEY (a1) REFERENCES referenced_dist_table(a)
table_with_references | FOREIGN KEY (a2) REFERENCES referenced_ref_table(a)
(3 rows)
SELECT alter_distributed_table('table_with_references', shard_count := 10, cascade_to_colocated := false);
@ -392,7 +392,7 @@ WARNING: foreign key referencing_dist_table_a_fkey will be dropped
(1 row)
SELECT conrelid::regclass::text AS "Referencing Table", pg_get_constraintdef(oid, true) AS "Definition" FROM pg_constraint
WHERE (conrelid::regclass::text = 'table_with_references' OR confrelid::regclass::text = 'table_with_references') AND contype = 'f' ORDER BY 1;
WHERE (conrelid::regclass::text = 'table_with_references' OR confrelid::regclass::text = 'table_with_references') AND contype = 'f' ORDER BY 1,2;
Referencing Table | Definition
---------------------------------------------------------------------
table_with_references | FOREIGN KEY (a2) REFERENCES referenced_ref_table(a)

View File

@ -102,13 +102,13 @@ SELECT create_distributed_table('referencing_dist_table', 'a', colocate_with:='r
SET client_min_messages TO WARNING;
SELECT conrelid::regclass::text AS "Referencing Table", pg_get_constraintdef(oid, true) AS "Definition" FROM pg_constraint
WHERE (conrelid::regclass::text = 'table_with_references' OR confrelid::regclass::text = 'table_with_references') AND contype = 'f' ORDER BY 1;
WHERE (conrelid::regclass::text = 'table_with_references' OR confrelid::regclass::text = 'table_with_references') AND contype = 'f' ORDER BY 1,2;
SELECT alter_distributed_table('table_with_references', shard_count := 12, cascade_to_colocated := true);
SELECT conrelid::regclass::text AS "Referencing Table", pg_get_constraintdef(oid, true) AS "Definition" FROM pg_constraint
WHERE (conrelid::regclass::text = 'table_with_references' OR confrelid::regclass::text = 'table_with_references') AND contype = 'f' ORDER BY 1;
WHERE (conrelid::regclass::text = 'table_with_references' OR confrelid::regclass::text = 'table_with_references') AND contype = 'f' ORDER BY 1,2;
SELECT alter_distributed_table('table_with_references', shard_count := 10, cascade_to_colocated := false);
SELECT conrelid::regclass::text AS "Referencing Table", pg_get_constraintdef(oid, true) AS "Definition" FROM pg_constraint
WHERE (conrelid::regclass::text = 'table_with_references' OR confrelid::regclass::text = 'table_with_references') AND contype = 'f' ORDER BY 1;
WHERE (conrelid::regclass::text = 'table_with_references' OR confrelid::regclass::text = 'table_with_references') AND contype = 'f' ORDER BY 1,2;
-- check when multi shard modify mode is set to sequential