mirror of https://github.com/citusdata/citus.git
Adjust tests for 9.5
parent
52631ea0fc
commit
64a9baffbd
|
@ -18,6 +18,7 @@ SELECT stop_metadata_sync_to_node('localhost',:worker_2_port);
|
|||
|
||||
-- create a distributed table, drop a column and sync the metadata
|
||||
SET citus.shard_replication_factor TO 1;
|
||||
SET citus.replication_model TO streaming;
|
||||
CREATE TABLE t1 (a int, b int, c int UNIQUE);
|
||||
SELECT create_distributed_table('t1', 'c');
|
||||
create_distributed_table
|
||||
|
@ -196,13 +197,7 @@ NOTICE: executing the command locally: UPDATE local_shard_execution_dropped_col
|
|||
-- has a dropped column but not the shard, via rebalance operation
|
||||
SET search_path TO local_shard_execution_dropped_column;
|
||||
ALTER TABLE t1 DROP COLUMN a;
|
||||
SELECT citus_move_shard_placement(2460000, 'localhost', :worker_1_port, 'localhost', :worker_2_port);
|
||||
citus_move_shard_placement
|
||||
---------------------------------------------------------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
\c - - - :worker_2_port
|
||||
\c - - - :worker_1_port
|
||||
SET search_path TO local_shard_execution_dropped_column;
|
||||
-- show the dropped columns
|
||||
SELECT attrelid::regclass, attname, attnum, attisdropped
|
||||
|
@ -210,10 +205,12 @@ FROM pg_attribute WHERE attrelid IN ('t1'::regclass, 't1_2460000'::regclass) and
|
|||
ORDER BY 1, 3, 2, 4;
|
||||
attrelid | attname | attnum | attisdropped
|
||||
---------------------------------------------------------------------
|
||||
t1_2460000 | ........pg.dropped.1........ | 1 | t
|
||||
t1_2460000 | ........pg.dropped.2........ | 2 | t
|
||||
t1_2460000 | c | 3 | f
|
||||
t1 | ........pg.dropped.1........ | 1 | t
|
||||
t1 | c | 2 | f
|
||||
t1_2460000 | c | 1 | f
|
||||
(3 rows)
|
||||
(5 rows)
|
||||
|
||||
prepare p1(int) as insert into t1(c) VALUES ($1) ON CONFLICT (c) DO NOTHING;
|
||||
SET citus.log_remote_commands TO ON;
|
||||
|
|
|
@ -12,12 +12,14 @@ SELECT stop_metadata_sync_to_node('localhost',:worker_2_port);
|
|||
|
||||
-- create a distributed table, drop a column and sync the metadata
|
||||
SET citus.shard_replication_factor TO 1;
|
||||
SET citus.replication_model TO streaming;
|
||||
CREATE TABLE t1 (a int, b int, c int UNIQUE);
|
||||
SELECT create_distributed_table('t1', 'c');
|
||||
ALTER TABLE t1 DROP COLUMN b;
|
||||
SELECT start_metadata_sync_to_node('localhost',:worker_1_port);
|
||||
SELECT start_metadata_sync_to_node('localhost',:worker_2_port);
|
||||
|
||||
|
||||
\c - - - :worker_1_port
|
||||
SET search_path TO local_shard_execution_dropped_column;
|
||||
|
||||
|
@ -84,9 +86,8 @@ execute p4(8);
|
|||
SET search_path TO local_shard_execution_dropped_column;
|
||||
ALTER TABLE t1 DROP COLUMN a;
|
||||
|
||||
SELECT citus_move_shard_placement(2460000, 'localhost', :worker_1_port, 'localhost', :worker_2_port);
|
||||
|
||||
\c - - - :worker_2_port
|
||||
\c - - - :worker_1_port
|
||||
SET search_path TO local_shard_execution_dropped_column;
|
||||
|
||||
-- show the dropped columns
|
||||
|
|
Loading…
Reference in New Issue