mirror of https://github.com/citusdata/citus.git
Merge pull request #5016 from citusdata/fix-test-shard-id-issue
Fix shard id difference for enterprisepull/5013/head
commit
98081557fb
|
@ -1947,6 +1947,7 @@ ORDER BY
|
||||||
"schema-test_2009" | 4
|
"schema-test_2009" | 4
|
||||||
(2 rows)
|
(2 rows)
|
||||||
|
|
||||||
|
SET citus.next_shard_id TO 1660300;
|
||||||
-- test we don't deadlock when attaching and detaching partitions from partitioned
|
-- test we don't deadlock when attaching and detaching partitions from partitioned
|
||||||
-- tables with foreign keys
|
-- tables with foreign keys
|
||||||
CREATE TABLE reference_table(id int PRIMARY KEY);
|
CREATE TABLE reference_table(id int PRIMARY KEY);
|
||||||
|
@ -2001,8 +2002,8 @@ INSERT INTO partitioning_test_2010 VALUES (1, '2010-02-01');
|
||||||
-- This should fail because of foreign key constraint violation
|
-- This should fail because of foreign key constraint violation
|
||||||
ALTER TABLE partitioning_test ATTACH PARTITION partitioning_test_2010
|
ALTER TABLE partitioning_test ATTACH PARTITION partitioning_test_2010
|
||||||
FOR VALUES FROM ('2010-01-01') TO ('2011-01-01');
|
FOR VALUES FROM ('2010-01-01') TO ('2011-01-01');
|
||||||
ERROR: insert or update on table "partitioning_test_2010_1660191" violates foreign key constraint "partitioning_reference_fkey_1660179"
|
ERROR: insert or update on table "partitioning_test_2010_1660314" violates foreign key constraint "partitioning_reference_fkey_1660302"
|
||||||
DETAIL: Key (id)=(X) is not present in table "reference_table_1660177".
|
DETAIL: Key (id)=(X) is not present in table "reference_table_1660300".
|
||||||
CONTEXT: while executing command on localhost:xxxxx
|
CONTEXT: while executing command on localhost:xxxxx
|
||||||
-- Truncate, so attaching again won't fail
|
-- Truncate, so attaching again won't fail
|
||||||
TRUNCATE partitioning_test_2010;
|
TRUNCATE partitioning_test_2010;
|
||||||
|
@ -2093,14 +2094,14 @@ DETAIL: Table "<dropped>" is modified, which might lead to data inconsistencies
|
||||||
CONTEXT: SQL statement "SELECT citus_drop_all_shards(v_obj.objid, v_obj.schema_name, v_obj.object_name)"
|
CONTEXT: SQL statement "SELECT citus_drop_all_shards(v_obj.objid, v_obj.schema_name, v_obj.object_name)"
|
||||||
PL/pgSQL function citus_drop_trigger() line 16 at PERFORM
|
PL/pgSQL function citus_drop_trigger() line 16 at PERFORM
|
||||||
DEBUG: drop cascades to 2 other objects
|
DEBUG: drop cascades to 2 other objects
|
||||||
DETAIL: drop cascades to constraint partitioning_reference_fkey_1660179 on table partitioning_schema.partitioning_test_1660179
|
DETAIL: drop cascades to constraint partitioning_reference_fkey_1660302 on table partitioning_schema.partitioning_test_1660302
|
||||||
drop cascades to constraint partitioning_reference_fkey_1660181 on table partitioning_schema.partitioning_test_1660181
|
drop cascades to constraint partitioning_reference_fkey_1660304 on table partitioning_schema.partitioning_test_1660304
|
||||||
DETAIL: from localhost:xxxxx
|
DETAIL: from localhost:xxxxx
|
||||||
CONTEXT: SQL statement "SELECT citus_drop_all_shards(v_obj.objid, v_obj.schema_name, v_obj.object_name)"
|
CONTEXT: SQL statement "SELECT citus_drop_all_shards(v_obj.objid, v_obj.schema_name, v_obj.object_name)"
|
||||||
PL/pgSQL function citus_drop_trigger() line 16 at PERFORM
|
PL/pgSQL function citus_drop_trigger() line 16 at PERFORM
|
||||||
DEBUG: drop cascades to 2 other objects
|
DEBUG: drop cascades to 2 other objects
|
||||||
DETAIL: drop cascades to constraint partitioning_reference_fkey_1660180 on table partitioning_schema.partitioning_test_1660180
|
DETAIL: drop cascades to constraint partitioning_reference_fkey_1660303 on table partitioning_schema.partitioning_test_1660303
|
||||||
drop cascades to constraint partitioning_reference_fkey_1660182 on table partitioning_schema.partitioning_test_1660182
|
drop cascades to constraint partitioning_reference_fkey_1660305 on table partitioning_schema.partitioning_test_1660305
|
||||||
DETAIL: from localhost:xxxxx
|
DETAIL: from localhost:xxxxx
|
||||||
CONTEXT: SQL statement "SELECT citus_drop_all_shards(v_obj.objid, v_obj.schema_name, v_obj.object_name)"
|
CONTEXT: SQL statement "SELECT citus_drop_all_shards(v_obj.objid, v_obj.schema_name, v_obj.object_name)"
|
||||||
PL/pgSQL function citus_drop_trigger() line 16 at PERFORM
|
PL/pgSQL function citus_drop_trigger() line 16 at PERFORM
|
||||||
|
|
|
@ -1164,6 +1164,7 @@ GROUP BY
|
||||||
ORDER BY
|
ORDER BY
|
||||||
1,2;
|
1,2;
|
||||||
|
|
||||||
|
SET citus.next_shard_id TO 1660300;
|
||||||
|
|
||||||
-- test we don't deadlock when attaching and detaching partitions from partitioned
|
-- test we don't deadlock when attaching and detaching partitions from partitioned
|
||||||
-- tables with foreign keys
|
-- tables with foreign keys
|
||||||
|
|
Loading…
Reference in New Issue