mirror of https://github.com/citusdata/citus.git
Use predictable placement IDs in regression test output
parent
d85fca6b57
commit
fd72cca6c8
|
@ -4,7 +4,7 @@
|
|||
-- Test checks whether constraints of distributed tables can be adjusted using
|
||||
-- the ALTER TABLE ... ADD CONSTRAINT ... command.
|
||||
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 1450000;
|
||||
ALTER SEQUENCE pg_catalog.pg_dist_jobid_seq RESTART 1450000;
|
||||
ALTER SEQUENCE pg_catalog.pg_dist_placement_placementid_seq RESTART 1450000;
|
||||
-- Check "PRIMARY KEY CONSTRAINT"
|
||||
CREATE TABLE products (
|
||||
product_no integer,
|
||||
|
@ -443,7 +443,7 @@ BEGIN;
|
|||
INSERT INTO products VALUES(1,'product_1', 5);
|
||||
-- DDL may error out after an INSERT because it might pick the wrong connection
|
||||
ALTER TABLE products ADD CONSTRAINT unn_pno UNIQUE(product_no);
|
||||
ERROR: cannot establish a new connection for placement 2327, since DML has been executed on a connection that is in use
|
||||
ERROR: cannot establish a new connection for placement 1450407, since DML has been executed on a connection that is in use
|
||||
ROLLBACK;
|
||||
BEGIN;
|
||||
-- Add constraints
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
-- MULTI_INSERT_SELECT
|
||||
--
|
||||
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 13300000;
|
||||
ALTER SEQUENCE pg_catalog.pg_dist_placement_placementid_seq RESTART 13300000;
|
||||
-- create co-located tables
|
||||
SET citus.shard_count = 4;
|
||||
SET citus.shard_replication_factor = 2;
|
||||
|
@ -1645,7 +1646,7 @@ BEGIN;
|
|||
ALTER TABLE reference_table ADD COLUMN z int;
|
||||
INSERT INTO raw_events_first (user_id)
|
||||
SELECT user_id FROM raw_events_second JOIN reference_table USING (user_id);
|
||||
ERROR: cannot establish a new connection for placement 655, since DDL has been executed on a connection that is in use
|
||||
ERROR: cannot establish a new connection for placement 13300024, since DDL has been executed on a connection that is in use
|
||||
ROLLBACK;
|
||||
-- Insert after copy is disallowed when the INSERT INTO ... SELECT chooses
|
||||
-- to use a connection for one shard, while the connection already modified
|
||||
|
@ -1653,7 +1654,7 @@ ROLLBACK;
|
|||
BEGIN;
|
||||
COPY raw_events_second (user_id, value_1) FROM STDIN DELIMITER ',';
|
||||
INSERT INTO raw_events_first SELECT * FROM raw_events_second;
|
||||
ERROR: cannot establish a new connection for placement 636, since DML has been executed on a connection that is in use
|
||||
ERROR: cannot establish a new connection for placement 13300005, since DML has been executed on a connection that is in use
|
||||
ROLLBACK;
|
||||
-- Insert after copy is currently allowed for single-shard operation.
|
||||
-- Both insert and copy are rolled back successfully.
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
-- the ALTER TABLE ... ADD CONSTRAINT ... command.
|
||||
|
||||
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 1450000;
|
||||
ALTER SEQUENCE pg_catalog.pg_dist_jobid_seq RESTART 1450000;
|
||||
ALTER SEQUENCE pg_catalog.pg_dist_placement_placementid_seq RESTART 1450000;
|
||||
|
||||
-- Check "PRIMARY KEY CONSTRAINT"
|
||||
CREATE TABLE products (
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
--
|
||||
|
||||
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 13300000;
|
||||
ALTER SEQUENCE pg_catalog.pg_dist_placement_placementid_seq RESTART 13300000;
|
||||
|
||||
-- create co-located tables
|
||||
SET citus.shard_count = 4;
|
||||
|
|
Loading…
Reference in New Issue