mirror of https://github.com/citusdata/citus.git
Turn MX off in failing tests
parent
ee0cd75648
commit
5c3692de4d
|
@ -960,7 +960,7 @@ select count(*) from pg_constraint where conname = 'fkey_test_drop';
|
|||
select inhrelid::regclass from pg_inherits where (select inhparent::regclass::text) ~ '^parent_1_\d{7}$' order by 1;
|
||||
inhrelid
|
||||
---------------------------------------------------------------------
|
||||
parent_1_child_1_1190084
|
||||
parent_1_child_1_1190082
|
||||
(1 row)
|
||||
|
||||
-- check the shell partition
|
||||
|
|
|
@ -144,7 +144,7 @@ SELECT create_distributed_table('referencing_table', 'ref_id');
|
|||
(1 row)
|
||||
|
||||
ALTER TABLE referencing_table ADD CONSTRAINT fkey_ref FOREIGN KEY(id) REFERENCES referenced_table(id) ON DELETE SET NULL;
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
8
|
||||
|
@ -158,7 +158,7 @@ SELECT create_distributed_table('referencing_table', 'ref_id');
|
|||
|
||||
(1 row)
|
||||
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
8
|
||||
|
@ -173,7 +173,7 @@ SELECT create_distributed_table('referencing_table', 'ref_id');
|
|||
(1 row)
|
||||
|
||||
ALTER TABLE referencing_table ADD CONSTRAINT fkey_ref FOREIGN KEY(id) REFERENCES referenced_table(id) ON DELETE SET DEFAULT;
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
8
|
||||
|
@ -189,7 +189,7 @@ BEGIN;
|
|||
(1 row)
|
||||
|
||||
COMMIT;
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
8
|
||||
|
@ -204,7 +204,7 @@ SELECT create_distributed_table('referencing_table', 'ref_id');
|
|||
(1 row)
|
||||
|
||||
ALTER TABLE referencing_table ADD CONSTRAINT fkey_ref FOREIGN KEY(id) REFERENCES referenced_table(id) ON UPDATE SET NULL;
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
8
|
||||
|
@ -219,7 +219,7 @@ SELECT create_distributed_table('referencing_table', 'ref_id');
|
|||
(1 row)
|
||||
|
||||
ALTER TABLE referencing_table ADD CONSTRAINT fkey_ref FOREIGN KEY(id) REFERENCES referenced_table(id) ON UPDATE SET DEFAULT;
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
8
|
||||
|
@ -234,7 +234,7 @@ SELECT create_distributed_table('referencing_table', 'ref_id');
|
|||
(1 row)
|
||||
|
||||
ALTER TABLE referencing_table ADD CONSTRAINT fkey_ref FOREIGN KEY(id) REFERENCES referenced_table(id) ON UPDATE CASCADE;
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
8
|
||||
|
@ -253,7 +253,7 @@ ALTER TABLE referencing_table ADD COLUMN referencing int REFERENCES referenced_t
|
|||
ERROR: cannot execute ADD COLUMN command with PRIMARY KEY, UNIQUE, FOREIGN and CHECK constraints
|
||||
DETAIL: Adding a column with a constraint in one command is not supported because all constraints in Citus must have explicit names
|
||||
HINT: You can issue each command separately such as ALTER TABLE referencing_table ADD COLUMN referencing data_type; ALTER TABLE referencing_table ADD CONSTRAINT constraint_name FOREIGN KEY (referencing) REFERENCES referenced_table(id) ON UPDATE CASCADE;
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
0
|
||||
|
@ -273,7 +273,7 @@ ALTER TABLE referencing_table ADD CONSTRAINT fkey_ref FOREIGN KEY (id) REFERENCE
|
|||
ERROR: cannot create foreign key constraint
|
||||
DETAIL: Citus currently supports foreign key constraints only for "citus.shard_replication_factor = 1".
|
||||
HINT: Please change "citus.shard_replication_factor to 1". To learn more about using foreign keys with other replication factors, please contact us at https://citusdata.com/about/contact_us.
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
0
|
||||
|
@ -292,7 +292,7 @@ ALTER TABLE referencing_table ADD COLUMN referencing_col int REFERENCES referenc
|
|||
ERROR: cannot create foreign key constraint
|
||||
DETAIL: Citus currently supports foreign key constraints only for "citus.shard_replication_factor = 1".
|
||||
HINT: Please change "citus.shard_replication_factor to 1". To learn more about using foreign keys with other replication factors, please contact us at https://citusdata.com/about/contact_us.
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
0
|
||||
|
@ -308,7 +308,7 @@ SELECT create_distributed_table('referencing_table', 'ref_id');
|
|||
|
||||
(1 row)
|
||||
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
8
|
||||
|
@ -332,7 +332,7 @@ BEGIN;
|
|||
(1 row)
|
||||
|
||||
COMMIT;
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
8
|
||||
|
@ -716,7 +716,7 @@ SELECT create_distributed_table('referencing_table', 'id');
|
|||
|
||||
ALTER TABLE referencing_table ADD CONSTRAINT fkey_ref FOREIGN KEY (id) REFERENCES referenced_table(test_column) ON DELETE CASCADE;
|
||||
ALTER TABLE referencing_table ADD CONSTRAINT foreign_key_2 FOREIGN KEY (id) REFERENCES referenced_table2(test_column2) ON DELETE CASCADE;
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
16
|
||||
|
@ -783,7 +783,7 @@ SELECT create_distributed_table('referencing_table', 'id');
|
|||
|
||||
(1 row)
|
||||
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
16
|
||||
|
@ -825,7 +825,7 @@ BEGIN;
|
|||
ALTER TABLE referencing_table ADD CONSTRAINT fkey_ref FOREIGN KEY (id) REFERENCES referenced_table(test_column) ON DELETE CASCADE;
|
||||
ALTER TABLE referencing_table ADD CONSTRAINT foreign_key_2 FOREIGN KEY (ref_id) REFERENCES referenced_table2(test_column2) ON DELETE CASCADE;
|
||||
COMMIT;
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
16
|
||||
|
@ -892,7 +892,7 @@ BEGIN;
|
|||
|
||||
ALTER TABLE referencing_table ADD CONSTRAINT foreign_key_2 FOREIGN KEY (ref_id) REFERENCES referenced_table2(test_column2) ON DELETE CASCADE;
|
||||
COMMIT;
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
16
|
||||
|
@ -937,7 +937,7 @@ ALTER TABLE referencing_table ADD CONSTRAINT fkey_ref FOREIGN KEY (id) REFERENCE
|
|||
ALTER TABLE referencing_table2 ADD CONSTRAINT fkey_ref FOREIGN KEY (ref_id) REFERENCES referenced_table(test_column2) ON DELETE CASCADE;
|
||||
ALTER TABLE referencing_table2 ADD CONSTRAINT fkey_ref_to_dist FOREIGN KEY (id) REFERENCES referencing_table(id) ON DELETE CASCADE;
|
||||
COMMIT;
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
24
|
||||
|
@ -989,7 +989,7 @@ SELECT create_reference_table('referenced_table');
|
|||
|
||||
(1 row)
|
||||
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
0
|
||||
|
@ -1025,7 +1025,7 @@ SELECT create_distributed_table('referencing_referencing_table', 'id');
|
|||
(1 row)
|
||||
|
||||
ALTER TABLE referencing_table ADD CONSTRAINT fkey_ref FOREIGN KEY (ref_id, ref_id2) REFERENCES referenced_table(test_column, test_column2) ON DELETE CASCADE;
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.referencing%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.referencing%\d{2,}';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
16
|
||||
|
@ -1117,14 +1117,14 @@ SELECT create_distributed_table('test_table_2', 'id');
|
|||
|
||||
(1 row)
|
||||
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
8
|
||||
(1 row)
|
||||
|
||||
ALTER TABLE test_table_2 DROP CONSTRAINT test_table_2_value_1_fkey;
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
0
|
||||
|
@ -1154,7 +1154,7 @@ HINT: Try re-running the transaction with "SET LOCAL citus.multi_shard_modify_m
|
|||
ALTER TABLE test_table_2 DROP CONSTRAINT test_table_2_value_1_fkey;
|
||||
ERROR: current transaction is aborted, commands ignored until end of transaction block
|
||||
COMMIT;
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
0
|
||||
|
@ -1178,7 +1178,7 @@ SELECT create_distributed_table('test_table_2', 'id');
|
|||
(1 row)
|
||||
|
||||
ALTER TABLE test_table_1 DROP CONSTRAINT test_table_1_pkey CASCADE;
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
0
|
||||
|
@ -1203,7 +1203,7 @@ BEGIN;
|
|||
|
||||
ALTER TABLE test_table_1 DROP CONSTRAINT test_table_1_pkey CASCADE;
|
||||
COMMIT;
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
0
|
||||
|
@ -1226,7 +1226,7 @@ SELECT create_distributed_table('test_table_2', 'id');
|
|||
(1 row)
|
||||
|
||||
ALTER TABLE test_table_2 DROP COLUMN value_1;
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
0
|
||||
|
@ -1251,7 +1251,7 @@ BEGIN;
|
|||
|
||||
ALTER TABLE test_table_2 DROP COLUMN value_1;
|
||||
COMMIT;
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
0
|
||||
|
@ -1274,7 +1274,7 @@ SELECT create_distributed_table('test_table_2', 'id');
|
|||
(1 row)
|
||||
|
||||
ALTER TABLE test_table_1 DROP COLUMN id CASCADE;
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
0
|
||||
|
@ -1299,7 +1299,7 @@ BEGIN;
|
|||
|
||||
ALTER TABLE test_table_1 DROP COLUMN id CASCADE;
|
||||
COMMIT;
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
0
|
||||
|
@ -1332,7 +1332,7 @@ INSERT INTO test_table_2 VALUES (4,2147483648);
|
|||
ALTER TABLE test_table_2 ALTER COLUMN value_1 SET DATA TYPE int;
|
||||
ERROR: integer out of range
|
||||
CONTEXT: while executing command on localhost:xxxxx
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
8
|
||||
|
@ -1359,7 +1359,7 @@ BEGIN;
|
|||
ALTER TABLE test_table_2 ALTER COLUMN value_1 SET DATA TYPE bigint;
|
||||
ALTER TABLE test_table_1 DROP COLUMN id CASCADE;
|
||||
COMMIT;
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
0
|
||||
|
|
|
@ -136,12 +136,5 @@ SELECT master_copy_shard_placement(
|
|||
do_repair := false,
|
||||
transfer_mode := 'block_writes');
|
||||
ERROR: Table 'mx_table' is streaming replicated. Shards of streaming replicated tables cannot be copied
|
||||
SELECT stop_metadata_sync_to_node('localhost', :worker_1_port);
|
||||
NOTICE: dropping metadata on the node (localhost,57637)
|
||||
stop_metadata_sync_to_node
|
||||
---------------------------------------------------------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
SET client_min_messages TO ERROR;
|
||||
DROP SCHEMA mcsp CASCADE;
|
||||
|
|
|
@ -413,6 +413,10 @@ CREATE INDEX ix_test_index_creation1_ix_test_index_creation1_ix_test_index_creat
|
|||
ON test_index_creation1 USING btree
|
||||
(tenant_id, timeperiod);
|
||||
NOTICE: identifier "ix_test_index_creation1_ix_test_index_creation1_ix_test_index_creation1_ix_test_index_creation1_ix_test_index_creation1" will be truncated to "ix_test_index_creation1_ix_test_index_creation1_ix_test_index_c"
|
||||
DEBUG: identifier "ix_test_index_creation1_ix_test_index_creation1_ix_test_index_creation1_ix_test_index_creation1_ix_test_index_creation1" will be truncated to "ix_test_index_creation1_ix_test_index_creation1_ix_test_index_c"
|
||||
DETAIL: from localhost:xxxxx
|
||||
DEBUG: identifier "ix_test_index_creation1_ix_test_index_creation1_ix_test_index_creation1_ix_test_index_creation1_ix_test_index_creation1" will be truncated to "ix_test_index_creation1_ix_test_index_creation1_ix_test_index_c"
|
||||
DETAIL: from localhost:xxxxx
|
||||
RESET client_min_messages;
|
||||
CREATE TABLE test_index_creation1_p2020_09_26 PARTITION OF test_index_creation1 FOR VALUES FROM ('2020-09-26 00:00:00') TO ('2020-09-27 00:00:00');
|
||||
CREATE TABLE test_index_creation1_p2020_09_27 PARTITION OF test_index_creation1 FOR VALUES FROM ('2020-09-27 00:00:00') TO ('2020-09-28 00:00:00');
|
||||
|
@ -522,7 +526,7 @@ SELECT count(*) FROM pg_inherits WHERE inhrelid::regclass::text = 'child_index'
|
|||
\c - - - :worker_1_port
|
||||
SET search_path TO multi_index_statements;
|
||||
-- show that child indices of partition shards also inherit from parent indices of parent shards
|
||||
SELECT count(*) FROM pg_inherits WHERE inhrelid::regclass::text LIKE 'child_index%' AND inhparent::regclass::text LIKE 'parent_index%';
|
||||
SELECT count(*) FROM pg_inherits WHERE inhrelid::regclass::text LIKE 'child_index\_%' AND inhparent::regclass::text LIKE 'parent_index\_%';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
16
|
||||
|
|
|
@ -272,13 +272,13 @@ SELECT * FROM pg_dist_node ORDER BY nodeid;
|
|||
5 | 1 | localhost | 8889 | default | f | t | secondary | second-cluster | f | t
|
||||
(4 rows)
|
||||
|
||||
SELECT * FROM pg_dist_partition ORDER BY logicalrelid;
|
||||
SELECT * FROM pg_dist_partition WHERE logicalrelid::text LIKE 'mx_testing_schema%' ORDER BY logicalrelid;
|
||||
logicalrelid | partmethod | partkey | colocationid | repmodel | autoconverted
|
||||
---------------------------------------------------------------------
|
||||
mx_testing_schema.mx_test_table | h | {VAR :varno 1 :varattno 1 :vartype 23 :vartypmod -1 :varcollid 0 :varlevelsup 0 :varnoold 1 :varoattno 1 :location -1} | 0 | s | f
|
||||
(1 row)
|
||||
|
||||
SELECT * FROM pg_dist_shard ORDER BY shardid;
|
||||
SELECT * FROM pg_dist_shard WHERE logicalrelid::text LIKE 'mx_testing_schema%' ORDER BY shardid;
|
||||
logicalrelid | shardid | shardstorage | shardminvalue | shardmaxvalue
|
||||
---------------------------------------------------------------------
|
||||
mx_testing_schema.mx_test_table | 1310000 | t | -2147483648 | -1610612737
|
||||
|
@ -291,7 +291,7 @@ SELECT * FROM pg_dist_shard ORDER BY shardid;
|
|||
mx_testing_schema.mx_test_table | 1310007 | t | 1610612736 | 2147483647
|
||||
(8 rows)
|
||||
|
||||
SELECT * FROM pg_dist_shard_placement ORDER BY shardid, nodename, nodeport;
|
||||
SELECT * FROM pg_dist_shard_placement WHERE shardid IN (SELECT shardid FROM pg_dist_shard WHERE logicalrelid::text LIKE 'mx_testing_schema%') ORDER BY shardid, nodename, nodeport;
|
||||
shardid | shardstate | shardlength | nodename | nodeport | placementid
|
||||
---------------------------------------------------------------------
|
||||
1310000 | 1 | 0 | localhost | 57637 | 100000
|
||||
|
@ -409,13 +409,13 @@ SELECT * FROM pg_dist_node ORDER BY nodeid;
|
|||
5 | 1 | localhost | 8889 | default | f | t | secondary | second-cluster | f | t
|
||||
(4 rows)
|
||||
|
||||
SELECT * FROM pg_dist_partition ORDER BY logicalrelid;
|
||||
SELECT * FROM pg_dist_partition WHERE logicalrelid::text LIKE 'mx_testing_schema%' ORDER BY logicalrelid;
|
||||
logicalrelid | partmethod | partkey | colocationid | repmodel | autoconverted
|
||||
---------------------------------------------------------------------
|
||||
mx_testing_schema.mx_test_table | h | {VAR :varno 1 :varattno 1 :vartype 23 :vartypmod -1 :varcollid 0 :varlevelsup 0 :varnoold 1 :varoattno 1 :location -1} | 0 | s | f
|
||||
(1 row)
|
||||
|
||||
SELECT * FROM pg_dist_shard ORDER BY shardid;
|
||||
SELECT * FROM pg_dist_shard WHERE logicalrelid::text LIKE 'mx_testing_schema%' ORDER BY shardid;
|
||||
logicalrelid | shardid | shardstorage | shardminvalue | shardmaxvalue
|
||||
---------------------------------------------------------------------
|
||||
mx_testing_schema.mx_test_table | 1310000 | t | -2147483648 | -1610612737
|
||||
|
@ -428,7 +428,7 @@ SELECT * FROM pg_dist_shard ORDER BY shardid;
|
|||
mx_testing_schema.mx_test_table | 1310007 | t | 1610612736 | 2147483647
|
||||
(8 rows)
|
||||
|
||||
SELECT * FROM pg_dist_shard_placement ORDER BY shardid, nodename, nodeport;
|
||||
SELECT * FROM pg_dist_shard_placement WHERE shardid IN (SELECT shardid FROM pg_dist_shard WHERE logicalrelid::text LIKE 'mx_testing_schema%') ORDER BY shardid, nodename, nodeport;
|
||||
shardid | shardstate | shardlength | nodename | nodeport | placementid
|
||||
---------------------------------------------------------------------
|
||||
1310000 | 1 | 0 | localhost | 57637 | 100000
|
||||
|
@ -730,12 +730,12 @@ ORDER BY
|
|||
\c - - - :worker_2_port
|
||||
\d mx_test_schema_1.mx_table_1
|
||||
\d mx_test_schema_2.mx_table_2
|
||||
SELECT * FROM pg_dist_partition;
|
||||
SELECT * FROM pg_dist_partition WHERE logicalrelid::text LIKE 'mx_test_schema%';
|
||||
logicalrelid | partmethod | partkey | colocationid | repmodel | autoconverted
|
||||
---------------------------------------------------------------------
|
||||
(0 rows)
|
||||
|
||||
SELECT * FROM pg_dist_shard;
|
||||
SELECT * FROM pg_dist_shard WHERE logicalrelid::text LIKE 'mx_test_schema%';
|
||||
logicalrelid | shardid | shardstorage | shardminvalue | shardmaxvalue
|
||||
---------------------------------------------------------------------
|
||||
(0 rows)
|
||||
|
|
|
@ -4257,6 +4257,13 @@ ERROR: non_partitioned_table is not partitioned
|
|||
CONTEXT: PL/pgSQL function drop_old_time_partitions(regclass,timestamp with time zone) line XX at RAISE
|
||||
DROP TABLE non_partitioned_table;
|
||||
-- https://github.com/citusdata/citus/issues/4962
|
||||
SELECT stop_metadata_sync_to_node('localhost', :worker_1_port);
|
||||
NOTICE: dropping metadata on the node (localhost,57637)
|
||||
stop_metadata_sync_to_node
|
||||
---------------------------------------------------------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
SET citus.shard_replication_factor TO 1;
|
||||
SET citus.next_shard_id TO 361168;
|
||||
CREATE TABLE part_table_with_very_long_name (
|
||||
|
@ -4322,13 +4329,6 @@ WHERE schemaname = 'partitioning_schema' AND tablename ilike '%part_table_with_%
|
|||
(6 rows)
|
||||
|
||||
\c - - - :master_port
|
||||
SELECT stop_metadata_sync_to_node('localhost', :worker_1_port);
|
||||
NOTICE: dropping metadata on the node (localhost,57637)
|
||||
stop_metadata_sync_to_node
|
||||
---------------------------------------------------------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
DROP SCHEMA partitioning_schema CASCADE;
|
||||
NOTICE: drop cascades to 4 other objects
|
||||
DETAIL: drop cascades to table partitioning_schema."schema-test"
|
||||
|
|
|
@ -10,13 +10,6 @@ ALTER SEQUENCE pg_catalog.pg_dist_node_nodeid_seq RESTART 1380000;
|
|||
-- create copy of pg_dist_shard_placement to reload after the test
|
||||
CREATE TABLE tmp_shard_placement AS SELECT * FROM pg_dist_shard_placement WHERE nodeport = :worker_2_port;
|
||||
DELETE FROM pg_dist_shard_placement WHERE nodeport = :worker_2_port;
|
||||
-- make worker 1 receive metadata changes
|
||||
SELECT start_metadata_sync_to_node('localhost', :worker_1_port);
|
||||
start_metadata_sync_to_node
|
||||
---------------------------------------------------------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
-- remove non-existing node
|
||||
SELECT master_remove_node('localhost', 55555);
|
||||
ERROR: node at "localhost:xxxxx" does not exist
|
||||
|
@ -1036,13 +1029,6 @@ SELECT 1 FROM master_activate_node('localhost', :worker_2_port);
|
|||
DROP TABLE remove_node_reference_table;
|
||||
DROP TABLE remove_node_reference_table_schema.table1;
|
||||
DROP SCHEMA remove_node_reference_table_schema CASCADE;
|
||||
SELECT stop_metadata_sync_to_node('localhost', :worker_1_port);
|
||||
NOTICE: dropping metadata on the node (localhost,57637)
|
||||
stop_metadata_sync_to_node
|
||||
---------------------------------------------------------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
-- reload pg_dist_shard_placement table
|
||||
INSERT INTO pg_dist_shard_placement (SELECT * FROM tmp_shard_placement);
|
||||
DROP TABLE tmp_shard_placement;
|
||||
|
|
|
@ -379,10 +379,10 @@ ORDER BY
|
|||
-- verify shards are not dropped
|
||||
\c - - - :worker_1_port
|
||||
\dt transactional_drop_reference*
|
||||
List of relations
|
||||
Schema | Name | Type | Owner
|
||||
List of relations
|
||||
Schema | Name | Type | Owner
|
||||
---------------------------------------------------------------------
|
||||
public | transactional_drop_reference_1410006 | table | postgres
|
||||
public | transactional_drop_reference | table | postgres
|
||||
(1 row)
|
||||
|
||||
\c - - - :master_port
|
||||
|
@ -656,7 +656,7 @@ ORDER BY
|
|||
\c - - - :master_port
|
||||
SET client_min_messages TO WARNING;
|
||||
-- try using the coordinator as a worker and then dropping the table
|
||||
SELECT 1 FROM master_add_node('localhost', :master_port);
|
||||
SELECT 1 FROM master_add_node('localhost', :master_port, groupid := 0);
|
||||
?column?
|
||||
---------------------------------------------------------------------
|
||||
1
|
||||
|
@ -679,12 +679,6 @@ SELECT master_remove_node('localhost', :master_port);
|
|||
|
||||
-- clean the workspace
|
||||
DROP TABLE transactional_drop_shards, transactional_drop_reference;
|
||||
SELECT stop_metadata_sync_to_node('localhost', :worker_1_port);
|
||||
stop_metadata_sync_to_node
|
||||
---------------------------------------------------------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
-- test DROP TABLE as a non-superuser in a transaction block
|
||||
CREATE USER try_drop_table WITH LOGIN;
|
||||
SELECT run_command_on_workers('CREATE USER try_drop_table WITH LOGIN');
|
||||
|
|
|
@ -268,12 +268,12 @@ SELECT hasmetadata FROM pg_dist_node WHERE nodeport=:worker_2_port;
|
|||
(1 row)
|
||||
|
||||
\c - - - :worker_2_port
|
||||
SELECT worker_drop_distributed_table(logicalrelid::regclass::text) FROM pg_dist_partition;
|
||||
SELECT worker_drop_distributed_table(logicalrelid::regclass::text) FROM pg_dist_partition WHERE logicalrelid::text LIKE 'mx\_%table%';
|
||||
worker_drop_distributed_table
|
||||
---------------------------------------------------------------------
|
||||
(0 rows)
|
||||
|
||||
SELECT count(*) FROM pg_dist_partition;
|
||||
SELECT count(*) FROM pg_dist_partition WHERE logicalrelid::text LIKE 'mx\_%table%';
|
||||
count
|
||||
---------------------------------------------------------------------
|
||||
0
|
||||
|
@ -379,7 +379,7 @@ NOTICE: dropping metadata on the node (localhost,57637)
|
|||
|
||||
\c - - - :worker_1_port
|
||||
DELETE FROM pg_dist_node;
|
||||
SELECT worker_drop_distributed_table(logicalrelid::regclass::text) FROM pg_dist_partition;
|
||||
SELECT worker_drop_distributed_table(logicalrelid::regclass::text) FROM pg_dist_partition WHERE logicalrelid::text LIKE 'mx\_%table%';
|
||||
worker_drop_distributed_table
|
||||
---------------------------------------------------------------------
|
||||
(0 rows)
|
||||
|
|
|
@ -121,6 +121,8 @@ FROM constraint_validations_in_workers
|
|||
ORDER BY 1, 2;
|
||||
name | validated
|
||||
---------------------------------------------------------------------
|
||||
validatable_constraint | t
|
||||
validatable_constraint | t
|
||||
validatable_constraint_8000009 | t
|
||||
validatable_constraint_8000010 | t
|
||||
validatable_constraint_8000011 | t
|
||||
|
@ -129,7 +131,7 @@ ORDER BY 1, 2;
|
|||
validatable_constraint_8000014 | t
|
||||
validatable_constraint_8000015 | t
|
||||
validatable_constraint_8000016 | t
|
||||
(8 rows)
|
||||
(10 rows)
|
||||
|
||||
DROP TABLE constrained_table;
|
||||
DROP TABLE referenced_table CASCADE;
|
||||
|
|
|
@ -21,7 +21,6 @@ test: single_node
|
|||
test: single_node_truncate
|
||||
test: turn_mx_on
|
||||
test: multi_cluster_management
|
||||
test: turn_mx_off
|
||||
|
||||
# below tests are placed right after multi_cluster_management as we do
|
||||
# remove/add node operations and we do not want any preexisting objects
|
||||
|
@ -33,8 +32,11 @@ test: alter_database_owner
|
|||
|
||||
test: multi_test_helpers multi_test_helpers_superuser
|
||||
test: multi_test_catalog_views
|
||||
test: check_mx
|
||||
test: turn_mx_off
|
||||
test: multi_table_ddl
|
||||
test: multi_sequence_default
|
||||
test: turn_mx_on
|
||||
test: multi_name_lengths
|
||||
test: multi_name_resolution
|
||||
test: multi_metadata_access
|
||||
|
@ -42,6 +44,24 @@ test: multi_metadata_attributes
|
|||
|
||||
test: multi_read_from_secondaries
|
||||
|
||||
# ----------
|
||||
# multi_citus_tools tests utility functions written for citus tools
|
||||
# ----------
|
||||
test: check_mx
|
||||
test: turn_mx_off
|
||||
test: multi_citus_tools
|
||||
test: turn_mx_on
|
||||
|
||||
# ----------
|
||||
# multi_replicate_reference_table tests replicating reference tables to new nodes after we add new nodes
|
||||
# multi_remove_node_reference_table tests metadata changes after master_remove_node
|
||||
# ----------
|
||||
test: check_mx
|
||||
test: turn_mx_off
|
||||
test: multi_replicate_reference_table
|
||||
test: turn_mx_on
|
||||
test: multi_remove_node_reference_table
|
||||
|
||||
# ----------
|
||||
# The following distributed tests depend on creating a partitioned table and
|
||||
# uploading data to it.
|
||||
|
@ -53,11 +73,14 @@ test: multi_behavioral_analytics_basics multi_behavioral_analytics_single_shard_
|
|||
test: multi_shard_update_delete recursive_dml_with_different_planners_executors
|
||||
test: insert_select_repartition window_functions dml_recursive multi_insert_select_window
|
||||
test: multi_insert_select_conflict citus_table_triggers
|
||||
test: multi_row_insert insert_select_into_local_table multi_create_table_new_features alter_index
|
||||
|
||||
test: multi_row_insert insert_select_into_local_table multi_create_table_new_features
|
||||
# following should not run in parallel because it relies on connection counts to workers
|
||||
test: insert_select_connection_leak
|
||||
|
||||
test: check_mx
|
||||
test: turn_mx_off
|
||||
test: alter_index
|
||||
test: turn_mx_on
|
||||
# ---------
|
||||
# at the end of the regression tests regarding recursively planned modifications
|
||||
# ensure that we don't leak any intermediate results
|
||||
|
@ -68,9 +91,13 @@ test: ensure_no_intermediate_data_leak
|
|||
# ----------
|
||||
# Tests for partitioning support
|
||||
# ----------
|
||||
test: multi_partitioning_utils multi_partitioning partitioning_issue_3970 replicated_partitioned_table
|
||||
test: multi_partitioning_utils replicated_partitioned_table
|
||||
test: check_mx
|
||||
test: turn_mx_off
|
||||
test: multi_partitioning partitioning_issue_3970
|
||||
test: drop_partitioned_table
|
||||
test: multi_fix_partition_shard_index_names
|
||||
test: turn_mx_on
|
||||
test: partition_wise_join
|
||||
|
||||
# ----------
|
||||
|
@ -83,8 +110,11 @@ test: multi_create_fdw
|
|||
# ----------
|
||||
# Tests for statistics propagation
|
||||
# ----------
|
||||
test: check_mx
|
||||
test: turn_mx_off
|
||||
test: propagate_statistics
|
||||
test: pg13_propagate_statistics
|
||||
test: turn_mx_on
|
||||
|
||||
# ----------
|
||||
# Test for updating table statistics
|
||||
|
@ -125,7 +155,13 @@ test: with_prepare
|
|||
test: with_nested with_where with_basics with_set_operations
|
||||
test: with_modifying cte_prepared_modify cte_nested_modification
|
||||
test: ensure_no_intermediate_data_leak
|
||||
test: with_executors with_join with_partitioning with_transactions with_dml
|
||||
test: with_executors with_join
|
||||
test: check_mx
|
||||
test: turn_mx_off
|
||||
test: with_partitioning
|
||||
test: with_transactions
|
||||
test: with_dml
|
||||
test: turn_mx_on
|
||||
|
||||
# ----------
|
||||
# Tests around DDL statements run on distributed tables
|
||||
|
@ -168,17 +204,23 @@ test: multi_outer_join
|
|||
test: multi_complex_count_distinct multi_select_distinct
|
||||
test: multi_modifications
|
||||
test: multi_distribution_metadata
|
||||
test: multi_generate_ddl_commands multi_create_shards multi_prune_shard_list multi_repair_shards
|
||||
test: multi_generate_ddl_commands multi_prune_shard_list multi_repair_shards
|
||||
test: multi_upsert multi_simple_queries multi_data_types
|
||||
test: master_copy_shard_placement
|
||||
# multi_utilities cannot be run in parallel with other tests because it checks
|
||||
# global locks
|
||||
test: multi_utilities
|
||||
test: foreign_key_to_reference_table validate_constraint
|
||||
test: multi_modifying_xacts
|
||||
test: multi_repartition_udt multi_repartitioned_subquery_udf multi_subtransactions
|
||||
test: multi_transaction_recovery
|
||||
|
||||
test: check_mx
|
||||
test: turn_mx_off
|
||||
test: multi_create_shards
|
||||
test: multi_modifying_xacts
|
||||
test: multi_transaction_recovery
|
||||
test: turn_mx_on
|
||||
|
||||
test: turn_mx_on
|
||||
test: local_dist_join_modifications
|
||||
test: local_table_join
|
||||
test: local_dist_join_mixed
|
||||
|
@ -188,7 +230,11 @@ test: citus_local_dist_joins
|
|||
# multi_copy creates hash and range-partitioned tables and performs COPY
|
||||
# multi_router_planner creates hash partitioned tables.
|
||||
# ---------
|
||||
test: multi_copy fast_path_router_modify pg_dump
|
||||
test: fast_path_router_modify pg_dump
|
||||
test: check_mx
|
||||
test: turn_mx_off
|
||||
test: multi_copy
|
||||
test: turn_mx_on
|
||||
test: multi_router_planner
|
||||
# These 2 tests have prepared statements which sometimes get invalidated by concurrent tests,
|
||||
# changing the debug output. We should not run them in parallel with others
|
||||
|
@ -208,6 +254,8 @@ test: multi_size_queries
|
|||
# ----------
|
||||
# multi_drop_extension makes sure we can safely drop and recreate the extension
|
||||
# ----------
|
||||
test: check_mx
|
||||
test: turn_mx_off
|
||||
test: multi_drop_extension
|
||||
|
||||
# ----------
|
||||
|
@ -216,6 +264,7 @@ test: multi_drop_extension
|
|||
# ----------
|
||||
test: multi_metadata_sync
|
||||
test: multi_unsupported_worker_operations
|
||||
test: turn_mx_on
|
||||
|
||||
# ----------
|
||||
# grant_on_schema_propagation tests if the GRANT ... ON SCHEMA queries are propagated correctly
|
||||
|
@ -232,6 +281,8 @@ test: multi_function_evaluation
|
|||
# ----------
|
||||
# multi_truncate tests truncate functionality for distributed tables
|
||||
# ----------
|
||||
test: check_mx
|
||||
test: turn_mx_off
|
||||
test: multi_truncate
|
||||
|
||||
# ----------
|
||||
|
@ -239,13 +290,9 @@ test: multi_truncate
|
|||
# multi_colocated_shard_transfer tests master_copy_shard_placement with colocated tables.
|
||||
# ----------
|
||||
test: multi_colocation_utils
|
||||
test: turn_mx_on
|
||||
test: multi_colocated_shard_transfer
|
||||
|
||||
# ----------
|
||||
# multi_citus_tools tests utility functions written for citus tools
|
||||
# ----------
|
||||
test: multi_citus_tools
|
||||
|
||||
# ----------
|
||||
# node_conninfo_reload tests that node_conninfo changes take effect
|
||||
# ----------
|
||||
|
@ -257,31 +304,31 @@ test: node_conninfo_reload
|
|||
test: multi_foreign_key
|
||||
test: multi_foreign_key_relation_graph
|
||||
|
||||
# ----------
|
||||
# multi_replicate_reference_table tests replicating reference tables to new nodes after we add new nodes
|
||||
# multi_remove_node_reference_table tests metadata changes after master_remove_node
|
||||
# ----------
|
||||
test: multi_replicate_reference_table
|
||||
test: multi_remove_node_reference_table
|
||||
|
||||
# --------
|
||||
# Replicating reference tables to coordinator. Add coordinator to pg_dist_node
|
||||
# and rerun some of the tests.
|
||||
# --------
|
||||
test: check_mx
|
||||
test: turn_mx_off
|
||||
test: add_coordinator
|
||||
test: multi_reference_table citus_local_tables_queries
|
||||
test: foreign_key_to_reference_table
|
||||
test: citus_local_table_triggers
|
||||
test: replicate_reference_tables_to_coordinator
|
||||
test: citus_local_tables
|
||||
test: multi_row_router_insert mixed_relkind_tests
|
||||
test: turn_mx_on
|
||||
test: multi_reference_table citus_local_tables_queries
|
||||
test: citus_local_table_triggers
|
||||
test: coordinator_shouldhaveshards
|
||||
test: local_shard_utility_command_execution
|
||||
test: citus_local_tables
|
||||
test: multi_row_router_insert mixed_relkind_tests create_ref_dist_from_citus_local
|
||||
test: create_ref_dist_from_citus_local
|
||||
test: undistribute_table_cascade
|
||||
test: create_citus_local_table_cascade
|
||||
test: fkeys_between_local_ref
|
||||
test: auto_undist_citus_local
|
||||
test: check_mx
|
||||
test: turn_mx_off
|
||||
test: mx_regular_user
|
||||
test: turn_mx_on
|
||||
test: remove_coordinator
|
||||
|
||||
# ----------
|
||||
|
@ -292,7 +339,10 @@ test: multi_transactional_drop_shards
|
|||
# ----------
|
||||
# multi_multiuser tests simple combinations of permission access and queries
|
||||
# ----------
|
||||
test: check_mx
|
||||
test: turn_mx_off
|
||||
test: multi_multiuser
|
||||
test: turn_mx_on
|
||||
|
||||
# ---------
|
||||
# multi_cache_invalidation tests for an obscure crash citus used to exhibit when shardids
|
||||
|
@ -314,9 +364,12 @@ test: ssl_by_default
|
|||
# object distribution tests
|
||||
# ---------
|
||||
test: distributed_types distributed_types_conflict disable_object_propagation distributed_types_xact_add_enum_value
|
||||
test: check_mx
|
||||
test: turn_mx_off
|
||||
test: distributed_functions distributed_functions_conflict
|
||||
test: distributed_collations distributed_collations_conflict
|
||||
test: distributed_procedure
|
||||
test: turn_mx_on
|
||||
|
||||
# ---------
|
||||
# deparsing logic tests
|
||||
|
@ -345,3 +398,4 @@ test: ensure_no_intermediate_data_leak
|
|||
# --------
|
||||
test: ensure_no_shared_connection_leak
|
||||
|
||||
test: check_mx
|
||||
|
|
|
@ -97,50 +97,50 @@ SELECT create_reference_table('referenced_table');
|
|||
CREATE TABLE referencing_table(id int, ref_id int);
|
||||
SELECT create_distributed_table('referencing_table', 'ref_id');
|
||||
ALTER TABLE referencing_table ADD CONSTRAINT fkey_ref FOREIGN KEY(id) REFERENCES referenced_table(id) ON DELETE SET NULL;
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
DROP TABLE referencing_table;
|
||||
|
||||
CREATE TABLE referencing_table(id int, ref_id int, FOREIGN KEY(id) REFERENCES referenced_table(id) ON DELETE SET NULL);
|
||||
SELECT create_distributed_table('referencing_table', 'ref_id');
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
DROP TABLE referencing_table;
|
||||
|
||||
CREATE TABLE referencing_table(id int, ref_id int);
|
||||
SELECT create_distributed_table('referencing_table', 'ref_id');
|
||||
ALTER TABLE referencing_table ADD CONSTRAINT fkey_ref FOREIGN KEY(id) REFERENCES referenced_table(id) ON DELETE SET DEFAULT;
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
DROP TABLE referencing_table;
|
||||
|
||||
BEGIN;
|
||||
CREATE TABLE referencing_table(id int, ref_id int, FOREIGN KEY(id) REFERENCES referenced_table(id) ON DELETE SET DEFAULT);
|
||||
SELECT create_distributed_table('referencing_table', 'ref_id');
|
||||
COMMIT;
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
DROP TABLE referencing_table;
|
||||
|
||||
CREATE TABLE referencing_table(id int, ref_id int);
|
||||
SELECT create_distributed_table('referencing_table', 'ref_id');
|
||||
ALTER TABLE referencing_table ADD CONSTRAINT fkey_ref FOREIGN KEY(id) REFERENCES referenced_table(id) ON UPDATE SET NULL;
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
DROP TABLE referencing_table;
|
||||
|
||||
CREATE TABLE referencing_table(id int, ref_id int);
|
||||
SELECT create_distributed_table('referencing_table', 'ref_id');
|
||||
ALTER TABLE referencing_table ADD CONSTRAINT fkey_ref FOREIGN KEY(id) REFERENCES referenced_table(id) ON UPDATE SET DEFAULT;
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
DROP TABLE referencing_table;
|
||||
|
||||
CREATE TABLE referencing_table(id int, ref_id int);
|
||||
SELECT create_distributed_table('referencing_table', 'ref_id');
|
||||
ALTER TABLE referencing_table ADD CONSTRAINT fkey_ref FOREIGN KEY(id) REFERENCES referenced_table(id) ON UPDATE CASCADE;
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
DROP TABLE referencing_table;
|
||||
|
||||
-- check if we can add the foreign key while adding the column
|
||||
CREATE TABLE referencing_table(id int, ref_id int);
|
||||
SELECT create_distributed_table('referencing_table', 'ref_id');
|
||||
ALTER TABLE referencing_table ADD COLUMN referencing int REFERENCES referenced_table(id) ON UPDATE CASCADE;
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
DROP TABLE referencing_table;
|
||||
|
||||
-- foreign keys are only supported when the replication factor = 1
|
||||
|
@ -148,21 +148,21 @@ SET citus.shard_replication_factor TO 2;
|
|||
CREATE TABLE referencing_table(id int, ref_id int);
|
||||
SELECT create_distributed_table('referencing_table', 'ref_id');
|
||||
ALTER TABLE referencing_table ADD CONSTRAINT fkey_ref FOREIGN KEY (id) REFERENCES referenced_table(id);
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
DROP TABLE referencing_table;
|
||||
|
||||
-- should fail when we add the column as well
|
||||
CREATE TABLE referencing_table(id int, ref_id int);
|
||||
SELECT create_distributed_table('referencing_table', 'ref_id');
|
||||
ALTER TABLE referencing_table ADD COLUMN referencing_col int REFERENCES referenced_table(id) ON DELETE SET NULL;
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
DROP TABLE referencing_table;
|
||||
SET citus.shard_replication_factor TO 1;
|
||||
|
||||
-- simple create_distributed_table should work in/out transactions on tables with foreign key to reference tables
|
||||
CREATE TABLE referencing_table(id int, ref_id int, FOREIGN KEY (id) REFERENCES referenced_table(id));
|
||||
SELECT create_distributed_table('referencing_table', 'ref_id');
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
DROP TABLE referencing_table;
|
||||
DROP TABLE referenced_table;
|
||||
|
||||
|
@ -172,7 +172,7 @@ BEGIN;
|
|||
CREATE TABLE referencing_table(id int, ref_id int, FOREIGN KEY (id) REFERENCES referenced_table(id));
|
||||
SELECT create_distributed_table('referencing_table', 'ref_id');
|
||||
COMMIT;
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
DROP TABLE referencing_table;
|
||||
|
||||
-- foreign keys are supported either in between distributed tables including the
|
||||
|
@ -411,7 +411,7 @@ SELECT create_distributed_table('referencing_table', 'id');
|
|||
ALTER TABLE referencing_table ADD CONSTRAINT fkey_ref FOREIGN KEY (id) REFERENCES referenced_table(test_column) ON DELETE CASCADE;
|
||||
ALTER TABLE referencing_table ADD CONSTRAINT foreign_key_2 FOREIGN KEY (id) REFERENCES referenced_table2(test_column2) ON DELETE CASCADE;
|
||||
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
|
||||
INSERT INTO referenced_table SELECT x, x+1 FROM generate_series(0,1000) AS f(x);
|
||||
INSERT INTO referenced_table2 SELECT x, x+1 FROM generate_series(500,1500) AS f(x);
|
||||
|
@ -442,7 +442,7 @@ SELECT create_reference_table('referenced_table');
|
|||
SELECT create_reference_table('referenced_table2');
|
||||
SELECT create_distributed_table('referencing_table', 'id');
|
||||
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
|
||||
\set VERBOSITY terse
|
||||
DROP TABLE referenced_table CASCADE;
|
||||
|
@ -468,7 +468,7 @@ BEGIN;
|
|||
ALTER TABLE referencing_table ADD CONSTRAINT foreign_key_2 FOREIGN KEY (ref_id) REFERENCES referenced_table2(test_column2) ON DELETE CASCADE;
|
||||
COMMIT;
|
||||
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
|
||||
INSERT INTO referenced_table SELECT x, x+1 FROM generate_series(0,1000) AS f(x);
|
||||
INSERT INTO referenced_table2 SELECT x, x+1 FROM generate_series(500,1500) AS f(x);
|
||||
|
@ -503,7 +503,7 @@ BEGIN;
|
|||
ALTER TABLE referencing_table ADD CONSTRAINT foreign_key_2 FOREIGN KEY (ref_id) REFERENCES referenced_table2(test_column2) ON DELETE CASCADE;
|
||||
COMMIT;
|
||||
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
|
||||
DROP TABLE referenced_table CASCADE;
|
||||
DROP TABLE referenced_table2 CASCADE;
|
||||
|
@ -532,7 +532,7 @@ ALTER TABLE referencing_table2 ADD CONSTRAINT fkey_ref FOREIGN KEY (ref_id) REFE
|
|||
ALTER TABLE referencing_table2 ADD CONSTRAINT fkey_ref_to_dist FOREIGN KEY (id) REFERENCES referencing_table(id) ON DELETE CASCADE;
|
||||
COMMIT;
|
||||
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
|
||||
INSERT INTO referenced_table SELECT x, x+1 FROM generate_series(0,1000) AS f(x);
|
||||
-- should fail
|
||||
|
@ -560,7 +560,7 @@ DROP TABLE referencing_table2 CASCADE;
|
|||
CREATE TABLE referenced_table(test_column int, test_column2 int UNIQUE, PRIMARY KEY(test_column));
|
||||
SELECT create_reference_table('referenced_table');
|
||||
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
|
||||
\set VERBOSITY terse
|
||||
DROP TABLE referenced_table CASCADE;
|
||||
|
@ -579,7 +579,7 @@ SELECT create_distributed_table('referencing_table', 'id');
|
|||
SELECT create_distributed_table('referencing_referencing_table', 'id');
|
||||
ALTER TABLE referencing_table ADD CONSTRAINT fkey_ref FOREIGN KEY (ref_id, ref_id2) REFERENCES referenced_table(test_column, test_column2) ON DELETE CASCADE;
|
||||
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.referencing%';
|
||||
SELECT COUNT(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.referencing%\d{2,}';
|
||||
|
||||
INSERT INTO referenced_table SELECT x, x+1 FROM generate_series(1,1000) AS f(x);
|
||||
INSERT INTO referencing_table SELECT x, x+1, x+2 FROM generate_series(1,999) AS f(x);
|
||||
|
@ -647,10 +647,10 @@ CREATE TABLE test_table_2(id int PRIMARY KEY, value_1 int, FOREIGN KEY(value_1)
|
|||
|
||||
SELECT create_reference_table('test_table_1');
|
||||
SELECT create_distributed_table('test_table_2', 'id');
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
|
||||
ALTER TABLE test_table_2 DROP CONSTRAINT test_table_2_value_1_fkey;
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
|
||||
DROP TABLE test_table_1, test_table_2;
|
||||
|
||||
|
@ -666,7 +666,7 @@ BEGIN;
|
|||
ALTER TABLE test_table_2 DROP CONSTRAINT test_table_2_value_1_fkey;
|
||||
COMMIT;
|
||||
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
DROP TABLE test_table_1, test_table_2;
|
||||
|
||||
-- check if we can drop the primary key which cascades to the foreign key
|
||||
|
@ -677,7 +677,7 @@ SELECT create_reference_table('test_table_1');
|
|||
SELECT create_distributed_table('test_table_2', 'id');
|
||||
|
||||
ALTER TABLE test_table_1 DROP CONSTRAINT test_table_1_pkey CASCADE;
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
DROP TABLE test_table_1, test_table_2;
|
||||
|
||||
-- check if we can drop the primary key which cascades to the foreign key in a transaction block
|
||||
|
@ -691,7 +691,7 @@ BEGIN;
|
|||
ALTER TABLE test_table_1 DROP CONSTRAINT test_table_1_pkey CASCADE;
|
||||
COMMIT;
|
||||
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
DROP TABLE test_table_1, test_table_2;
|
||||
|
||||
-- check if we can drop the column which foreign key is referencing from
|
||||
|
@ -702,7 +702,7 @@ SELECT create_reference_table('test_table_1');
|
|||
SELECT create_distributed_table('test_table_2', 'id');
|
||||
|
||||
ALTER TABLE test_table_2 DROP COLUMN value_1;
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
DROP TABLE test_table_1, test_table_2;
|
||||
|
||||
-- check if we can drop the column which foreign key is referencing from in a transaction block
|
||||
|
@ -715,7 +715,7 @@ BEGIN;
|
|||
|
||||
ALTER TABLE test_table_2 DROP COLUMN value_1;
|
||||
COMMIT;
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
DROP TABLE test_table_1, test_table_2;
|
||||
|
||||
-- check if we can drop the column which foreign key is referencing to
|
||||
|
@ -726,7 +726,7 @@ SELECT create_reference_table('test_table_1');
|
|||
SELECT create_distributed_table('test_table_2', 'id');
|
||||
|
||||
ALTER TABLE test_table_1 DROP COLUMN id CASCADE;
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
DROP TABLE test_table_1, test_table_2;
|
||||
|
||||
-- check if we can drop the column which foreign key is referencing from in a transaction block
|
||||
|
@ -739,7 +739,7 @@ BEGIN;
|
|||
|
||||
ALTER TABLE test_table_1 DROP COLUMN id CASCADE;
|
||||
COMMIT;
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
DROP TABLE test_table_1, test_table_2;
|
||||
|
||||
-- check if we can alter the column type which foreign key is referencing to
|
||||
|
@ -759,7 +759,7 @@ INSERT INTO test_table_1 VALUES (2147483648,4);
|
|||
INSERT INTO test_table_2 VALUES (4,2147483648);
|
||||
-- should fail since there is a bigint out of integer range > (2^32 - 1)
|
||||
ALTER TABLE test_table_2 ALTER COLUMN value_1 SET DATA TYPE int;
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
DROP TABLE test_table_1 CASCADE;
|
||||
DROP TABLE test_table_2;
|
||||
|
||||
|
@ -775,7 +775,7 @@ BEGIN;
|
|||
ALTER TABLE test_table_1 DROP COLUMN id CASCADE;
|
||||
COMMIT;
|
||||
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid LIKE 'fkey_reference_table.%' AND refd_relid LIKE 'fkey_reference_table.%';
|
||||
SELECT count(*) FROM table_fkeys_in_workers WHERE relid SIMILAR TO 'fkey_reference_table.%\d{2,}' AND refd_relid SIMILAR TO 'fkey_reference_table.%\d{2,}';
|
||||
DROP TABLE test_table_1, test_table_2;
|
||||
|
||||
-- check if we can TRUNCATE the referenced table
|
||||
|
|
|
@ -110,7 +110,5 @@ SELECT master_copy_shard_placement(
|
|||
do_repair := false,
|
||||
transfer_mode := 'block_writes');
|
||||
|
||||
SELECT stop_metadata_sync_to_node('localhost', :worker_1_port);
|
||||
|
||||
SET client_min_messages TO ERROR;
|
||||
DROP SCHEMA mcsp CASCADE;
|
||||
|
|
|
@ -335,7 +335,7 @@ SELECT count(*) FROM pg_inherits WHERE inhrelid::regclass::text = 'child_index'
|
|||
SET search_path TO multi_index_statements;
|
||||
|
||||
-- show that child indices of partition shards also inherit from parent indices of parent shards
|
||||
SELECT count(*) FROM pg_inherits WHERE inhrelid::regclass::text LIKE 'child_index%' AND inhparent::regclass::text LIKE 'parent_index%';
|
||||
SELECT count(*) FROM pg_inherits WHERE inhrelid::regclass::text LIKE 'child_index\_%' AND inhparent::regclass::text LIKE 'parent_index\_%';
|
||||
|
||||
\c - - - :master_port
|
||||
SET search_path TO multi_index_statements;
|
||||
|
|
|
@ -108,9 +108,9 @@ SELECT nodeid, hasmetadata FROM pg_dist_node WHERE nodename='localhost' AND node
|
|||
\c - - - :worker_1_port
|
||||
SELECT * FROM pg_dist_local_group;
|
||||
SELECT * FROM pg_dist_node ORDER BY nodeid;
|
||||
SELECT * FROM pg_dist_partition ORDER BY logicalrelid;
|
||||
SELECT * FROM pg_dist_shard ORDER BY shardid;
|
||||
SELECT * FROM pg_dist_shard_placement ORDER BY shardid, nodename, nodeport;
|
||||
SELECT * FROM pg_dist_partition WHERE logicalrelid::text LIKE 'mx_testing_schema%' ORDER BY logicalrelid;
|
||||
SELECT * FROM pg_dist_shard WHERE logicalrelid::text LIKE 'mx_testing_schema%' ORDER BY shardid;
|
||||
SELECT * FROM pg_dist_shard_placement WHERE shardid IN (SELECT shardid FROM pg_dist_shard WHERE logicalrelid::text LIKE 'mx_testing_schema%') ORDER BY shardid, nodename, nodeport;
|
||||
SELECT "Column", "Type", "Modifiers" FROM table_desc WHERE relid='mx_testing_schema.mx_test_table'::regclass;
|
||||
SELECT "Column", "Type", "Definition" FROM index_attrs WHERE
|
||||
relid = 'mx_testing_schema.mx_test_table_col_1_key'::regclass;
|
||||
|
@ -158,9 +158,9 @@ SELECT start_metadata_sync_to_node('localhost', :worker_1_port);
|
|||
\c - - - :worker_1_port
|
||||
SELECT * FROM pg_dist_local_group;
|
||||
SELECT * FROM pg_dist_node ORDER BY nodeid;
|
||||
SELECT * FROM pg_dist_partition ORDER BY logicalrelid;
|
||||
SELECT * FROM pg_dist_shard ORDER BY shardid;
|
||||
SELECT * FROM pg_dist_shard_placement ORDER BY shardid, nodename, nodeport;
|
||||
SELECT * FROM pg_dist_partition WHERE logicalrelid::text LIKE 'mx_testing_schema%' ORDER BY logicalrelid;
|
||||
SELECT * FROM pg_dist_shard WHERE logicalrelid::text LIKE 'mx_testing_schema%' ORDER BY shardid;
|
||||
SELECT * FROM pg_dist_shard_placement WHERE shardid IN (SELECT shardid FROM pg_dist_shard WHERE logicalrelid::text LIKE 'mx_testing_schema%') ORDER BY shardid, nodename, nodeport;
|
||||
SELECT "Column", "Type", "Modifiers" FROM table_desc WHERE relid='mx_testing_schema.mx_test_table'::regclass;
|
||||
SELECT "Column", "Type", "Definition" FROM index_attrs WHERE
|
||||
relid = 'mx_testing_schema.mx_test_table_col_1_key'::regclass;
|
||||
|
@ -294,8 +294,8 @@ ORDER BY
|
|||
\d mx_test_schema_1.mx_table_1
|
||||
\d mx_test_schema_2.mx_table_2
|
||||
|
||||
SELECT * FROM pg_dist_partition;
|
||||
SELECT * FROM pg_dist_shard;
|
||||
SELECT * FROM pg_dist_partition WHERE logicalrelid::text LIKE 'mx_test_schema%';
|
||||
SELECT * FROM pg_dist_shard WHERE logicalrelid::text LIKE 'mx_test_schema%';
|
||||
SELECT * FROM pg_dist_shard_placement ORDER BY shardid, nodename, nodeport;
|
||||
|
||||
-- Check that CREATE INDEX statement is propagated
|
||||
|
|
|
@ -1969,6 +1969,7 @@ CALL drop_old_time_partitions('non_partitioned_table', now());
|
|||
DROP TABLE non_partitioned_table;
|
||||
|
||||
-- https://github.com/citusdata/citus/issues/4962
|
||||
SELECT stop_metadata_sync_to_node('localhost', :worker_1_port);
|
||||
SET citus.shard_replication_factor TO 1;
|
||||
SET citus.next_shard_id TO 361168;
|
||||
CREATE TABLE part_table_with_very_long_name (
|
||||
|
@ -2007,7 +2008,6 @@ SELECT tablename, indexname FROM pg_indexes
|
|||
WHERE schemaname = 'partitioning_schema' AND tablename ilike '%part_table_with_%' ORDER BY 1, 2;
|
||||
|
||||
\c - - - :master_port
|
||||
SELECT stop_metadata_sync_to_node('localhost', :worker_1_port);
|
||||
DROP SCHEMA partitioning_schema CASCADE;
|
||||
RESET search_path;
|
||||
DROP TABLE IF EXISTS
|
||||
|
|
|
@ -14,9 +14,6 @@ ALTER SEQUENCE pg_catalog.pg_dist_node_nodeid_seq RESTART 1380000;
|
|||
CREATE TABLE tmp_shard_placement AS SELECT * FROM pg_dist_shard_placement WHERE nodeport = :worker_2_port;
|
||||
DELETE FROM pg_dist_shard_placement WHERE nodeport = :worker_2_port;
|
||||
|
||||
-- make worker 1 receive metadata changes
|
||||
SELECT start_metadata_sync_to_node('localhost', :worker_1_port);
|
||||
|
||||
-- remove non-existing node
|
||||
SELECT master_remove_node('localhost', 55555);
|
||||
|
||||
|
@ -624,8 +621,6 @@ DROP TABLE remove_node_reference_table;
|
|||
DROP TABLE remove_node_reference_table_schema.table1;
|
||||
DROP SCHEMA remove_node_reference_table_schema CASCADE;
|
||||
|
||||
SELECT stop_metadata_sync_to_node('localhost', :worker_1_port);
|
||||
|
||||
-- reload pg_dist_shard_placement table
|
||||
INSERT INTO pg_dist_shard_placement (SELECT * FROM tmp_shard_placement);
|
||||
DROP TABLE tmp_shard_placement;
|
||||
|
|
|
@ -366,7 +366,7 @@ ORDER BY
|
|||
SET client_min_messages TO WARNING;
|
||||
|
||||
-- try using the coordinator as a worker and then dropping the table
|
||||
SELECT 1 FROM master_add_node('localhost', :master_port);
|
||||
SELECT 1 FROM master_add_node('localhost', :master_port, groupid := 0);
|
||||
CREATE TABLE citus_local (id serial, k int);
|
||||
SELECT create_distributed_table('citus_local', 'id');
|
||||
INSERT INTO citus_local (k) VALUES (2);
|
||||
|
@ -375,7 +375,6 @@ SELECT master_remove_node('localhost', :master_port);
|
|||
|
||||
-- clean the workspace
|
||||
DROP TABLE transactional_drop_shards, transactional_drop_reference;
|
||||
SELECT stop_metadata_sync_to_node('localhost', :worker_1_port);
|
||||
|
||||
-- test DROP TABLE as a non-superuser in a transaction block
|
||||
CREATE USER try_drop_table WITH LOGIN;
|
||||
|
|
|
@ -166,8 +166,8 @@ SELECT hasmetadata FROM pg_dist_node WHERE nodeport=:worker_2_port;
|
|||
SELECT stop_metadata_sync_to_node('localhost', :worker_2_port);
|
||||
SELECT hasmetadata FROM pg_dist_node WHERE nodeport=:worker_2_port;
|
||||
\c - - - :worker_2_port
|
||||
SELECT worker_drop_distributed_table(logicalrelid::regclass::text) FROM pg_dist_partition;
|
||||
SELECT count(*) FROM pg_dist_partition;
|
||||
SELECT worker_drop_distributed_table(logicalrelid::regclass::text) FROM pg_dist_partition WHERE logicalrelid::text LIKE 'mx\_%table%';
|
||||
SELECT count(*) FROM pg_dist_partition WHERE logicalrelid::text LIKE 'mx\_%table%';
|
||||
SELECT count(*) FROM pg_dist_node;
|
||||
\c - - - :worker_1_port
|
||||
|
||||
|
@ -229,7 +229,7 @@ DROP TABLE mx_table_2;
|
|||
SELECT stop_metadata_sync_to_node('localhost', :worker_1_port);
|
||||
\c - - - :worker_1_port
|
||||
DELETE FROM pg_dist_node;
|
||||
SELECT worker_drop_distributed_table(logicalrelid::regclass::text) FROM pg_dist_partition;
|
||||
SELECT worker_drop_distributed_table(logicalrelid::regclass::text) FROM pg_dist_partition WHERE logicalrelid::text LIKE 'mx\_%table%';
|
||||
\c - - - :master_port
|
||||
ALTER SEQUENCE pg_catalog.pg_dist_colocationid_seq RESTART :last_colocation_id;
|
||||
|
||||
|
|
Loading…
Reference in New Issue