mirror of https://github.com/citusdata/citus.git
Move upgrade test to separate file
parent
2108cff6b3
commit
b9745d1c70
|
@ -1,16 +0,0 @@
|
|||
ALTER SYSTEM SET citus.enable_metadata_sync_by_default TO OFF;
|
||||
SELECT pg_reload_conf();
|
||||
pg_reload_conf
|
||||
---------------------------------------------------------------------
|
||||
t
|
||||
(1 row)
|
||||
|
||||
SET client_min_messages TO ERROR;
|
||||
SELECT stop_metadata_sync_to_node(nodename, nodeport) FROM pg_dist_node WHERE isactive = 't' and noderole = 'primary';
|
||||
stop_metadata_sync_to_node
|
||||
---------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
(3 rows)
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
select logicalrelid, autoconverted from pg_dist_partition
|
||||
where logicalrelid IN ('citus_local_autoconverted'::regclass,
|
||||
'citus_local_not_autoconverted'::regclass);
|
||||
logicalrelid | autoconverted
|
||||
-------------------------------+---------------
|
||||
citus_local_autoconverted | t
|
||||
citus_local_not_autoconverted | f
|
||||
(2 rows)
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
CREATE TABLE ref_not_autoconverted(a int unique);
|
||||
CREATE TABLE citus_local_autoconverted(a int unique references ref_not_autoconverted(a));
|
||||
CREATE TABLE citus_local_not_autoconverted(a int unique);
|
||||
select create_reference_table('ref_not_autoconverted');
|
||||
create_reference_table
|
||||
------------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
select citus_add_local_table_to_metadata('citus_local_not_autoconverted');
|
||||
citus_add_local_table_to_metadata
|
||||
-----------------------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
select logicalrelid, autoconverted from pg_dist_partition
|
||||
where logicalrelid IN ('citus_local_autoconverted'::regclass,
|
||||
'citus_local_not_autoconverted'::regclass);
|
||||
logicalrelid | autoconverted
|
||||
-------------------------------+---------------
|
||||
citus_local_autoconverted | t
|
||||
citus_local_not_autoconverted | f
|
||||
(2 rows)
|
||||
|
|
@ -3,17 +3,11 @@ BEGIN;
|
|||
SELECT * FROM pg_indexes WHERE schemaname = 'upgrade_basic' ORDER BY tablename;
|
||||
schemaname | tablename | indexname | tablespace | indexdef
|
||||
---------------------------------------------------------------------
|
||||
upgrade_basic | citus_local_autoconverted | citus_local_autoconverted_a_key | | CREATE UNIQUE INDEX citus_local_autoconverted_a_key ON upgrade_basic.citus_local_autoconverted USING btree (a)
|
||||
upgrade_basic | citus_local_autoconverted_102141 | citus_local_autoconverted_a_key_102141 | | CREATE UNIQUE INDEX citus_local_autoconverted_a_key_102141 ON upgrade_basic.citus_local_autoconverted_102141 USING btree (a)
|
||||
upgrade_basic | citus_local_not_autoconverted | citus_local_not_autoconverted_a_key | | CREATE UNIQUE INDEX citus_local_not_autoconverted_a_key ON upgrade_basic.citus_local_not_autoconverted USING btree (a)
|
||||
upgrade_basic | citus_local_not_autoconverted_102142 | citus_local_not_autoconverted_a_key_102142 | | CREATE UNIQUE INDEX citus_local_not_autoconverted_a_key_102142 ON upgrade_basic.citus_local_not_autoconverted_102142 USING btree (a)
|
||||
upgrade_basic | r | r_pkey | | CREATE UNIQUE INDEX r_pkey ON upgrade_basic.r USING btree (a)
|
||||
upgrade_basic | r_102104 | r_pkey_102104 | | CREATE UNIQUE INDEX r_pkey_102104 ON upgrade_basic.r_102104 USING btree (a)
|
||||
upgrade_basic | ref_not_autoconverted | ref_not_autoconverted_a_key | | CREATE UNIQUE INDEX ref_not_autoconverted_a_key ON upgrade_basic.ref_not_autoconverted USING btree (a)
|
||||
upgrade_basic | ref_not_autoconverted_102140 | ref_not_autoconverted_a_key_102140 | | CREATE UNIQUE INDEX ref_not_autoconverted_a_key_102140 ON upgrade_basic.ref_not_autoconverted_102140 USING btree (a)
|
||||
upgrade_basic | t | t_a_idx | | CREATE INDEX t_a_idx ON upgrade_basic.t USING hash (a)
|
||||
upgrade_basic | tp | tp_pkey | | CREATE UNIQUE INDEX tp_pkey ON upgrade_basic.tp USING btree (a)
|
||||
(10 rows)
|
||||
(4 rows)
|
||||
|
||||
SELECT nextval('pg_dist_shardid_seq') = MAX(shardid)+1 FROM pg_dist_shard;
|
||||
?column?
|
||||
|
@ -76,10 +70,7 @@ SELECT logicalrelid FROM pg_dist_partition
|
|||
r
|
||||
tr
|
||||
t_append
|
||||
ref_not_autoconverted
|
||||
citus_local_autoconverted
|
||||
citus_local_not_autoconverted
|
||||
(9 rows)
|
||||
(6 rows)
|
||||
|
||||
SELECT tgrelid::regclass, tgfoid::regproc, tgisinternal, tgenabled, tgtype::int4::bit(8)
|
||||
FROM pg_dist_partition
|
||||
|
@ -97,10 +88,7 @@ SELECT tgrelid::regclass, tgfoid::regproc, tgisinternal, tgenabled, tgtype::int4
|
|||
r | citus_truncate_trigger | t | O | 00100000
|
||||
tr | citus_truncate_trigger | t | O | 00100000
|
||||
t_append | citus_truncate_trigger | t | O | 00100000
|
||||
ref_not_autoconverted | citus_truncate_trigger | t | O | 00100000
|
||||
citus_local_autoconverted | citus_truncate_trigger | t | O | 00100000
|
||||
citus_local_not_autoconverted | citus_truncate_trigger | t | O | 00100000
|
||||
(9 rows)
|
||||
(6 rows)
|
||||
|
||||
SELECT * FROM t ORDER BY a;
|
||||
a
|
||||
|
@ -362,12 +350,3 @@ SELECT * FROM t_append ORDER BY id;
|
|||
(9 rows)
|
||||
|
||||
ROLLBACK;
|
||||
select logicalrelid, autoconverted from pg_dist_partition
|
||||
where logicalrelid IN ('citus_local_autoconverted'::regclass,
|
||||
'citus_local_not_autoconverted'::regclass);
|
||||
logicalrelid | autoconverted
|
||||
-------------------------------+---------------
|
||||
citus_local_autoconverted | t
|
||||
citus_local_not_autoconverted | f
|
||||
(2 rows)
|
||||
|
||||
|
|
|
@ -78,27 +78,3 @@ SELECT master_create_distributed_table('t_append', 'id', 'append');
|
|||
|
||||
\copy t_append FROM STDIN DELIMITER ','
|
||||
\copy t_append FROM STDIN DELIMITER ','
|
||||
CREATE TABLE ref_not_autoconverted(a int unique);
|
||||
CREATE TABLE citus_local_autoconverted(a int unique references ref_not_autoconverted(a));
|
||||
CREATE TABLE citus_local_not_autoconverted(a int unique);
|
||||
select create_reference_table('ref_not_autoconverted');
|
||||
create_reference_table
|
||||
------------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
select citus_add_local_table_to_metadata('citus_local_not_autoconverted');
|
||||
citus_add_local_table_to_metadata
|
||||
-----------------------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
select logicalrelid, autoconverted from pg_dist_partition
|
||||
where logicalrelid IN ('citus_local_autoconverted'::regclass,
|
||||
'citus_local_not_autoconverted'::regclass);
|
||||
logicalrelid | autoconverted
|
||||
-------------------------------+---------------
|
||||
citus_local_autoconverted | t
|
||||
citus_local_not_autoconverted | f
|
||||
(2 rows)
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
select logicalrelid, autoconverted from pg_dist_partition
|
||||
where logicalrelid IN ('citus_local_autoconverted'::regclass,
|
||||
'citus_local_not_autoconverted'::regclass);
|
|
@ -0,0 +1,8 @@
|
|||
CREATE TABLE ref_not_autoconverted(a int unique);
|
||||
CREATE TABLE citus_local_autoconverted(a int unique references ref_not_autoconverted(a));
|
||||
CREATE TABLE citus_local_not_autoconverted(a int unique);
|
||||
select create_reference_table('ref_not_autoconverted');
|
||||
select citus_add_local_table_to_metadata('citus_local_not_autoconverted');
|
||||
select logicalrelid, autoconverted from pg_dist_partition
|
||||
where logicalrelid IN ('citus_local_autoconverted'::regclass,
|
||||
'citus_local_not_autoconverted'::regclass);
|
|
@ -118,7 +118,3 @@ SELECT * FROM t_append ORDER BY id;
|
|||
|
||||
|
||||
ROLLBACK;
|
||||
|
||||
select logicalrelid, autoconverted from pg_dist_partition
|
||||
where logicalrelid IN ('citus_local_autoconverted'::regclass,
|
||||
'citus_local_not_autoconverted'::regclass);
|
||||
|
|
|
@ -64,12 +64,3 @@ SELECT master_create_distributed_table('t_append', 'id', 'append');
|
|||
6,3
|
||||
7,4
|
||||
\.
|
||||
|
||||
CREATE TABLE ref_not_autoconverted(a int unique);
|
||||
CREATE TABLE citus_local_autoconverted(a int unique references ref_not_autoconverted(a));
|
||||
CREATE TABLE citus_local_not_autoconverted(a int unique);
|
||||
select create_reference_table('ref_not_autoconverted');
|
||||
select citus_add_local_table_to_metadata('citus_local_not_autoconverted');
|
||||
select logicalrelid, autoconverted from pg_dist_partition
|
||||
where logicalrelid IN ('citus_local_autoconverted'::regclass,
|
||||
'citus_local_not_autoconverted'::regclass);
|
||||
|
|
Loading…
Reference in New Issue