mirror of https://github.com/citusdata/citus.git
Remove todo from reference_table_utils
parent
dda53a0bba
commit
9b8802ba2d
|
@ -102,16 +102,6 @@ replicate_reference_tables(PG_FUNCTION_ARGS)
|
||||||
void
|
void
|
||||||
EnsureReferenceTablesExistOnAllNodes(void)
|
EnsureReferenceTablesExistOnAllNodes(void)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
* TODO: remove this. This is here so we don't have to update regression test
|
|
||||||
* outputs because of reference table colocation id being changed. Specially
|
|
||||||
* multi_colocation_utils which requires the test itself being updated.
|
|
||||||
*/
|
|
||||||
if (ReferenceTableOidList() == NIL)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Prevent this function from running concurrently with itself.
|
* Prevent this function from running concurrently with itself.
|
||||||
*
|
*
|
||||||
|
|
|
@ -337,6 +337,13 @@ SELECT find_shard_interval_index(1300016);
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- check external colocation API
|
-- check external colocation API
|
||||||
|
SELECT count(*) FROM pg_dist_partition WHERE colocationid = 4;
|
||||||
|
count
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
0
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
DELETE FROM pg_dist_colocation WHERE colocationid = 4;
|
||||||
SET citus.shard_count = 2;
|
SET citus.shard_count = 2;
|
||||||
CREATE TABLE table1_groupA ( id int );
|
CREATE TABLE table1_groupA ( id int );
|
||||||
SELECT create_distributed_table('table1_groupA', 'id');
|
SELECT create_distributed_table('table1_groupA', 'id');
|
||||||
|
@ -433,12 +440,11 @@ SELECT * FROM pg_dist_colocation
|
||||||
ORDER BY colocationid;
|
ORDER BY colocationid;
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
3 | 4 | 2 | 23 | 0
|
|
||||||
4 | 2 | 2 | 23 | 0
|
4 | 2 | 2 | 23 | 0
|
||||||
5 | 2 | 1 | 23 | 0
|
5 | 2 | 1 | 23 | 0
|
||||||
6 | 2 | 2 | 25 | 100
|
6 | 2 | 2 | 25 | 100
|
||||||
7 | 8 | 2 | 23 | 0
|
7 | 8 | 2 | 23 | 0
|
||||||
(5 rows)
|
(4 rows)
|
||||||
|
|
||||||
SELECT logicalrelid, colocationid FROM pg_dist_partition
|
SELECT logicalrelid, colocationid FROM pg_dist_partition
|
||||||
WHERE colocationid >= 1 AND colocationid < 1000
|
WHERE colocationid >= 1 AND colocationid < 1000
|
||||||
|
@ -557,13 +563,12 @@ SELECT * FROM pg_dist_colocation
|
||||||
ORDER BY colocationid;
|
ORDER BY colocationid;
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
3 | 4 | 2 | 23 | 0
|
|
||||||
4 | 2 | 2 | 23 | 0
|
4 | 2 | 2 | 23 | 0
|
||||||
5 | 2 | 1 | 23 | 0
|
5 | 2 | 1 | 23 | 0
|
||||||
6 | 2 | 2 | 25 | 100
|
6 | 2 | 2 | 25 | 100
|
||||||
7 | 8 | 2 | 23 | 0
|
7 | 8 | 2 | 23 | 0
|
||||||
11 | 3 | 2 | 23 | 0
|
11 | 3 | 2 | 23 | 0
|
||||||
(6 rows)
|
(5 rows)
|
||||||
|
|
||||||
SELECT logicalrelid, colocationid FROM pg_dist_partition
|
SELECT logicalrelid, colocationid FROM pg_dist_partition
|
||||||
WHERE colocationid >= 1 AND colocationid < 1000
|
WHERE colocationid >= 1 AND colocationid < 1000
|
||||||
|
@ -652,13 +657,12 @@ SELECT * FROM pg_dist_colocation
|
||||||
ORDER BY colocationid;
|
ORDER BY colocationid;
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
3 | 4 | 2 | 23 | 0
|
|
||||||
4 | 2 | 2 | 23 | 0
|
4 | 2 | 2 | 23 | 0
|
||||||
5 | 2 | 1 | 23 | 0
|
5 | 2 | 1 | 23 | 0
|
||||||
6 | 2 | 2 | 25 | 100
|
6 | 2 | 2 | 25 | 100
|
||||||
7 | 8 | 2 | 23 | 0
|
7 | 8 | 2 | 23 | 0
|
||||||
11 | 3 | 2 | 23 | 0
|
11 | 3 | 2 | 23 | 0
|
||||||
(6 rows)
|
(5 rows)
|
||||||
|
|
||||||
-- cross check with internal colocation API
|
-- cross check with internal colocation API
|
||||||
SELECT
|
SELECT
|
||||||
|
|
|
@ -454,18 +454,18 @@ FROM pg_dist_partition NATURAL JOIN shard_counts
|
||||||
ORDER BY colocationid, logicalrelid;
|
ORDER BY colocationid, logicalrelid;
|
||||||
logicalrelid | colocationid | shard_count | partmethod | repmodel
|
logicalrelid | colocationid | shard_count | partmethod | repmodel
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
citus_mx_test_schema_join_1.nation_hash | 1390002 | 4 | h | s
|
customer_mx | 1390001 | 1 | n | t
|
||||||
citus_mx_test_schema_join_1.nation_hash_2 | 1390002 | 4 | h | s
|
nation_mx | 1390001 | 1 | n | t
|
||||||
citus_mx_test_schema_join_2.nation_hash | 1390002 | 4 | h | s
|
part_mx | 1390001 | 1 | n | t
|
||||||
citus_mx_test_schema.nation_hash_collation_search_path | 1390002 | 4 | h | s
|
supplier_mx | 1390001 | 1 | n | t
|
||||||
citus_mx_test_schema.nation_hash_composite_types | 1390002 | 4 | h | s
|
citus_mx_test_schema_join_1.nation_hash | 1390003 | 4 | h | s
|
||||||
mx_ddl_table | 1390002 | 4 | h | s
|
citus_mx_test_schema_join_1.nation_hash_2 | 1390003 | 4 | h | s
|
||||||
app_analytics_events_mx | 1390002 | 4 | h | s
|
citus_mx_test_schema_join_2.nation_hash | 1390003 | 4 | h | s
|
||||||
company_employees_mx | 1390002 | 4 | h | s
|
citus_mx_test_schema.nation_hash_collation_search_path | 1390003 | 4 | h | s
|
||||||
customer_mx | 1390004 | 1 | n | t
|
citus_mx_test_schema.nation_hash_composite_types | 1390003 | 4 | h | s
|
||||||
nation_mx | 1390004 | 1 | n | t
|
mx_ddl_table | 1390003 | 4 | h | s
|
||||||
part_mx | 1390004 | 1 | n | t
|
app_analytics_events_mx | 1390003 | 4 | h | s
|
||||||
supplier_mx | 1390004 | 1 | n | t
|
company_employees_mx | 1390003 | 4 | h | s
|
||||||
nation_hash | 1390006 | 16 | h | s
|
nation_hash | 1390006 | 16 | h | s
|
||||||
citus_mx_test_schema.nation_hash | 1390006 | 16 | h | s
|
citus_mx_test_schema.nation_hash | 1390006 | 16 | h | s
|
||||||
lineitem_mx | 1390007 | 16 | h | s
|
lineitem_mx | 1390007 | 16 | h | s
|
||||||
|
|
|
@ -135,15 +135,15 @@ WHERE
|
||||||
1380000 | 1 | 0 | localhost | 57638
|
1380000 | 1 | 0 | localhost | 57638
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'remove_node_reference_table'::regclass);
|
WHERE logicalrelid = 'remove_node_reference_table'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
10004 | 1 | -1 | 0 | 0
|
1 | -1 | 0
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
\c - - - :worker_1_port
|
\c - - - :worker_1_port
|
||||||
|
@ -188,15 +188,15 @@ WHERE
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
(0 rows)
|
(0 rows)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'remove_node_reference_table'::regclass);
|
WHERE logicalrelid = 'remove_node_reference_table'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
10004 | 1 | -1 | 0 | 0
|
1 | -1 | 0
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
\c - - - :worker_1_port
|
\c - - - :worker_1_port
|
||||||
|
@ -266,15 +266,15 @@ WHERE
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
(0 rows)
|
(0 rows)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'remove_node_reference_table'::regclass);
|
WHERE logicalrelid = 'remove_node_reference_table'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
10004 | 1 | -1 | 0 | 0
|
1 | -1 | 0
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
\c - - - :worker_1_port
|
\c - - - :worker_1_port
|
||||||
|
@ -320,15 +320,15 @@ WHERE
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
(0 rows)
|
(0 rows)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'remove_node_reference_table'::regclass);
|
WHERE logicalrelid = 'remove_node_reference_table'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
10004 | 1 | -1 | 0 | 0
|
1 | -1 | 0
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
\c - - - :worker_1_port
|
\c - - - :worker_1_port
|
||||||
|
@ -367,15 +367,15 @@ WHERE
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
(0 rows)
|
(0 rows)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'remove_node_reference_table'::regclass);
|
WHERE logicalrelid = 'remove_node_reference_table'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
10004 | 1 | -1 | 0 | 0
|
1 | -1 | 0
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
\c - - - :worker_1_port
|
\c - - - :worker_1_port
|
||||||
|
@ -421,15 +421,15 @@ WHERE
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
(0 rows)
|
(0 rows)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'remove_node_reference_table'::regclass);
|
WHERE logicalrelid = 'remove_node_reference_table'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
10004 | 1 | -1 | 0 | 0
|
1 | -1 | 0
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
\c - - - :worker_1_port
|
\c - - - :worker_1_port
|
||||||
|
@ -476,15 +476,15 @@ WHERE
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
(0 rows)
|
(0 rows)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'remove_node_reference_table'::regclass);
|
WHERE logicalrelid = 'remove_node_reference_table'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
10004 | 1 | -1 | 0 | 0
|
1 | -1 | 0
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
\c - - - :worker_1_port
|
\c - - - :worker_1_port
|
||||||
|
@ -531,15 +531,15 @@ WHERE
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
(0 rows)
|
(0 rows)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'remove_node_reference_table'::regclass);
|
WHERE logicalrelid = 'remove_node_reference_table'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
10004 | 1 | -1 | 0 | 0
|
1 | -1 | 0
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
--verify the data is inserted
|
--verify the data is inserted
|
||||||
|
@ -599,15 +599,15 @@ WHERE
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
(0 rows)
|
(0 rows)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'remove_node_reference_table'::regclass);
|
WHERE logicalrelid = 'remove_node_reference_table'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
10004 | 1 | -1 | 0 | 0
|
1 | -1 | 0
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
\c - - - :worker_1_port
|
\c - - - :worker_1_port
|
||||||
|
@ -654,15 +654,15 @@ WHERE
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
(0 rows)
|
(0 rows)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'remove_node_reference_table'::regclass);
|
WHERE logicalrelid = 'remove_node_reference_table'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
10004 | 1 | -1 | 0 | 0
|
1 | -1 | 0
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
\c - - - :worker_1_port
|
\c - - - :worker_1_port
|
||||||
|
@ -718,15 +718,15 @@ WHERE
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
(0 rows)
|
(0 rows)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'remove_node_reference_table'::regclass);
|
WHERE logicalrelid = 'remove_node_reference_table'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
10004 | 1 | -1 | 0 | 0
|
1 | -1 | 0
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
BEGIN;
|
BEGIN;
|
||||||
|
@ -805,15 +805,15 @@ ORDER BY
|
||||||
1380002 | 1 | 0 | localhost | 57638
|
1380002 | 1 | 0 | localhost | 57638
|
||||||
(2 rows)
|
(2 rows)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'remove_node_reference_table_schema.table1'::regclass);
|
WHERE logicalrelid = 'remove_node_reference_table_schema.table1'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
10004 | 1 | -1 | 0 | 0
|
1 | -1 | 0
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
\c - - - :worker_1_port
|
\c - - - :worker_1_port
|
||||||
|
@ -861,15 +861,15 @@ WHERE
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
(0 rows)
|
(0 rows)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'remove_node_reference_table_schema.table1'::regclass);
|
WHERE logicalrelid = 'remove_node_reference_table_schema.table1'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
10004 | 1 | -1 | 0 | 0
|
1 | -1 | 0
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
\c - - - :worker_1_port
|
\c - - - :worker_1_port
|
||||||
|
@ -918,15 +918,15 @@ ORDER BY
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
(0 rows)
|
(0 rows)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'remove_node_reference_table'::regclass);
|
WHERE logicalrelid = 'remove_node_reference_table'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
10004 | 1 | -1 | 0 | 0
|
1 | -1 | 0
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
\c - - - :worker_1_port
|
\c - - - :worker_1_port
|
||||||
|
@ -971,15 +971,15 @@ WHERE
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
(0 rows)
|
(0 rows)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'remove_node_reference_table'::regclass);
|
WHERE logicalrelid = 'remove_node_reference_table'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
10004 | 1 | -1 | 0 | 0
|
1 | -1 | 0
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
\c - - - :worker_1_port
|
\c - - - :worker_1_port
|
||||||
|
|
|
@ -126,16 +126,17 @@ SELECT create_distributed_table('upgrade_reference_table_append', 'column1', 'ap
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
COPY upgrade_reference_table_append FROM STDIN;
|
COPY upgrade_reference_table_append FROM STDIN;
|
||||||
|
SELECT colocationid AS reference_table_colocationid FROM pg_dist_colocation WHERE distributioncolumntype=0 \gset
|
||||||
-- situation before upgrade_reference_table
|
-- situation before upgrade_reference_table
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_append'::regclass;
|
logicalrelid = 'upgrade_reference_table_append'::regclass;
|
||||||
partmethod | partkeyisnull | colocationid | repmodel
|
partmethod | partkeyisnull | has_reference_table_colocation_id | repmodel
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
a | f | 0 | c
|
a | f | f | c
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -149,13 +150,13 @@ WHERE
|
||||||
1360009 | f | f
|
1360009 | f | f
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'upgrade_reference_table_append'::regclass);
|
WHERE logicalrelid = 'upgrade_reference_table_append'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
(0 rows)
|
(0 rows)
|
||||||
|
|
||||||
|
@ -182,14 +183,14 @@ SELECT upgrade_to_reference_table('upgrade_reference_table_append');
|
||||||
|
|
||||||
-- situation after upgrade_reference_table
|
-- situation after upgrade_reference_table
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_append'::regclass;
|
logicalrelid = 'upgrade_reference_table_append'::regclass;
|
||||||
partmethod | partkeyisnull | colocationid | repmodel
|
partmethod | partkeyisnull | has_reference_table_colocation_id | repmodel
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
n | t | 10004 | t
|
n | t | t | t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -203,15 +204,15 @@ WHERE
|
||||||
1360009 | t | t
|
1360009 | t | t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'upgrade_reference_table_append'::regclass);
|
WHERE logicalrelid = 'upgrade_reference_table_append'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
10004 | 1 | -1 | 0 | 0
|
1 | -1 | 0
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -240,14 +241,14 @@ SELECT create_distributed_table('upgrade_reference_table_one_worker', 'column1')
|
||||||
UPDATE pg_dist_partition SET repmodel='c' WHERE logicalrelid='upgrade_reference_table_one_worker'::regclass;
|
UPDATE pg_dist_partition SET repmodel='c' WHERE logicalrelid='upgrade_reference_table_one_worker'::regclass;
|
||||||
-- situation before upgrade_reference_table
|
-- situation before upgrade_reference_table
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_one_worker'::regclass;
|
logicalrelid = 'upgrade_reference_table_one_worker'::regclass;
|
||||||
partmethod | partkeyisnull | colocationid | repmodel
|
partmethod | partkeyisnull | has_reference_table_colocation_id | repmodel
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
h | f | 1360001 | c
|
h | f | f | c
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -261,15 +262,15 @@ WHERE
|
||||||
1360010 | f | f
|
1360010 | f | f
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'upgrade_reference_table_one_worker'::regclass);
|
WHERE logicalrelid = 'upgrade_reference_table_one_worker'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
1360001 | 1 | 1 | 23 | 0
|
1 | 1 | 23
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -294,14 +295,14 @@ SELECT upgrade_to_reference_table('upgrade_reference_table_one_worker');
|
||||||
|
|
||||||
-- situation after upgrade_reference_table
|
-- situation after upgrade_reference_table
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_one_worker'::regclass;
|
logicalrelid = 'upgrade_reference_table_one_worker'::regclass;
|
||||||
partmethod | partkeyisnull | colocationid | repmodel
|
partmethod | partkeyisnull | has_reference_table_colocation_id | repmodel
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
n | t | 10004 | t
|
n | t | t | t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -315,15 +316,15 @@ WHERE
|
||||||
1360010 | t | t
|
1360010 | t | t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'upgrade_reference_table_one_worker'::regclass);
|
WHERE logicalrelid = 'upgrade_reference_table_one_worker'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
10004 | 1 | -1 | 0 | 0
|
1 | -1 | 0
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -354,14 +355,14 @@ UPDATE pg_dist_shard_placement SET shardstate = 3
|
||||||
WHERE shardid = (SELECT shardid FROM pg_dist_shard WHERE logicalrelid = 'upgrade_reference_table_one_unhealthy'::regclass::oid) AND nodeport = :worker_1_port;
|
WHERE shardid = (SELECT shardid FROM pg_dist_shard WHERE logicalrelid = 'upgrade_reference_table_one_unhealthy'::regclass::oid) AND nodeport = :worker_1_port;
|
||||||
-- situation before upgrade_reference_table
|
-- situation before upgrade_reference_table
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_one_unhealthy'::regclass;
|
logicalrelid = 'upgrade_reference_table_one_unhealthy'::regclass;
|
||||||
partmethod | partkeyisnull | colocationid | repmodel
|
partmethod | partkeyisnull | has_reference_table_colocation_id | repmodel
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
h | f | 1360002 | c
|
h | f | f | c
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -375,15 +376,15 @@ WHERE
|
||||||
1360011 | f | f
|
1360011 | f | f
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'upgrade_reference_table_one_unhealthy'::regclass);
|
WHERE logicalrelid = 'upgrade_reference_table_one_unhealthy'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
1360002 | 1 | 2 | 23 | 0
|
1 | 2 | 23
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -409,14 +410,14 @@ SELECT upgrade_to_reference_table('upgrade_reference_table_one_unhealthy');
|
||||||
|
|
||||||
-- situation after upgrade_reference_table
|
-- situation after upgrade_reference_table
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_one_unhealthy'::regclass;
|
logicalrelid = 'upgrade_reference_table_one_unhealthy'::regclass;
|
||||||
partmethod | partkeyisnull | colocationid | repmodel
|
partmethod | partkeyisnull | has_reference_table_colocation_id | repmodel
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
n | t | 10004 | t
|
n | t | t | t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -430,15 +431,15 @@ WHERE
|
||||||
1360011 | t | t
|
1360011 | t | t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'upgrade_reference_table_one_unhealthy'::regclass);
|
WHERE logicalrelid = 'upgrade_reference_table_one_unhealthy'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
10004 | 1 | -1 | 0 | 0
|
1 | -1 | 0
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -467,14 +468,14 @@ SELECT create_distributed_table('upgrade_reference_table_both_healthy', 'column1
|
||||||
|
|
||||||
-- situation before upgrade_reference_table
|
-- situation before upgrade_reference_table
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_both_healthy'::regclass;
|
logicalrelid = 'upgrade_reference_table_both_healthy'::regclass;
|
||||||
partmethod | partkeyisnull | colocationid | repmodel
|
partmethod | partkeyisnull | has_reference_table_colocation_id | repmodel
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
h | f | 1360003 | c
|
h | f | f | c
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -488,15 +489,15 @@ WHERE
|
||||||
1360012 | f | f
|
1360012 | f | f
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'upgrade_reference_table_both_healthy'::regclass);
|
WHERE logicalrelid = 'upgrade_reference_table_both_healthy'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
1360003 | 1 | 2 | 23 | 0
|
1 | 2 | 23
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -521,14 +522,14 @@ SELECT upgrade_to_reference_table('upgrade_reference_table_both_healthy');
|
||||||
|
|
||||||
-- situation after upgrade_reference_table
|
-- situation after upgrade_reference_table
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_both_healthy'::regclass;
|
logicalrelid = 'upgrade_reference_table_both_healthy'::regclass;
|
||||||
partmethod | partkeyisnull | colocationid | repmodel
|
partmethod | partkeyisnull | has_reference_table_colocation_id | repmodel
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
n | t | 10004 | t
|
n | t | t | t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -542,15 +543,15 @@ WHERE
|
||||||
1360012 | t | t
|
1360012 | t | t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'upgrade_reference_table_both_healthy'::regclass);
|
WHERE logicalrelid = 'upgrade_reference_table_both_healthy'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
10004 | 1 | -1 | 0 | 0
|
1 | -1 | 0
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -580,14 +581,14 @@ SELECT create_distributed_table('upgrade_reference_table_transaction_rollback',
|
||||||
UPDATE pg_dist_partition SET repmodel='c' WHERE logicalrelid='upgrade_reference_table_transaction_rollback'::regclass;
|
UPDATE pg_dist_partition SET repmodel='c' WHERE logicalrelid='upgrade_reference_table_transaction_rollback'::regclass;
|
||||||
-- situation before upgrade_reference_table
|
-- situation before upgrade_reference_table
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_transaction_rollback'::regclass;
|
logicalrelid = 'upgrade_reference_table_transaction_rollback'::regclass;
|
||||||
partmethod | partkeyisnull | colocationid | repmodel
|
partmethod | partkeyisnull | has_reference_table_colocation_id | repmodel
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
h | f | 1360004 | c
|
h | f | f | c
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -601,15 +602,15 @@ WHERE
|
||||||
1360013 | f | f
|
1360013 | f | f
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'upgrade_reference_table_transaction_rollback'::regclass);
|
WHERE logicalrelid = 'upgrade_reference_table_transaction_rollback'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
1360004 | 1 | 1 | 23 | 0
|
1 | 1 | 23
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -636,14 +637,14 @@ SELECT upgrade_to_reference_table('upgrade_reference_table_transaction_rollback'
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
-- situation after upgrade_reference_table
|
-- situation after upgrade_reference_table
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_transaction_rollback'::regclass;
|
logicalrelid = 'upgrade_reference_table_transaction_rollback'::regclass;
|
||||||
partmethod | partkeyisnull | colocationid | repmodel
|
partmethod | partkeyisnull | has_reference_table_colocation_id | repmodel
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
h | f | 1360004 | c
|
h | f | f | c
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -657,15 +658,15 @@ WHERE
|
||||||
1360013 | f | f
|
1360013 | f | f
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'upgrade_reference_table_transaction_rollback'::regclass);
|
WHERE logicalrelid = 'upgrade_reference_table_transaction_rollback'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
1360004 | 1 | 1 | 23 | 0
|
1 | 1 | 23
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -695,14 +696,14 @@ SELECT create_distributed_table('upgrade_reference_table_transaction_commit', 'c
|
||||||
UPDATE pg_dist_partition SET repmodel='c' WHERE logicalrelid='upgrade_reference_table_transaction_commit'::regclass;
|
UPDATE pg_dist_partition SET repmodel='c' WHERE logicalrelid='upgrade_reference_table_transaction_commit'::regclass;
|
||||||
-- situation before upgrade_reference_table
|
-- situation before upgrade_reference_table
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_transaction_commit'::regclass;
|
logicalrelid = 'upgrade_reference_table_transaction_commit'::regclass;
|
||||||
partmethod | partkeyisnull | colocationid | repmodel
|
partmethod | partkeyisnull | has_reference_table_colocation_id | repmodel
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
h | f | 1360004 | c
|
h | f | f | c
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -716,15 +717,15 @@ WHERE
|
||||||
1360014 | f | f
|
1360014 | f | f
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'upgrade_reference_table_transaction_commit'::regclass);
|
WHERE logicalrelid = 'upgrade_reference_table_transaction_commit'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
1360004 | 1 | 1 | 23 | 0
|
1 | 1 | 23
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -751,14 +752,14 @@ SELECT upgrade_to_reference_table('upgrade_reference_table_transaction_commit');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
-- situation after upgrade_reference_table
|
-- situation after upgrade_reference_table
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_transaction_commit'::regclass;
|
logicalrelid = 'upgrade_reference_table_transaction_commit'::regclass;
|
||||||
partmethod | partkeyisnull | colocationid | repmodel
|
partmethod | partkeyisnull | has_reference_table_colocation_id | repmodel
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
n | t | 10004 | t
|
n | t | t | t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -772,15 +773,15 @@ WHERE
|
||||||
1360014 | t | t
|
1360014 | t | t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'upgrade_reference_table_transaction_commit'::regclass);
|
WHERE logicalrelid = 'upgrade_reference_table_transaction_commit'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
10004 | 1 | -1 | 0 | 0
|
1 | -1 | 0
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -821,14 +822,14 @@ SELECT create_distributed_table('upgrade_reference_table_mx', 'column1');
|
||||||
|
|
||||||
-- verify that streaming replicated tables cannot be upgraded to reference tables
|
-- verify that streaming replicated tables cannot be upgraded to reference tables
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_mx'::regclass;
|
logicalrelid = 'upgrade_reference_table_mx'::regclass;
|
||||||
partmethod | partkeyisnull | colocationid | repmodel
|
partmethod | partkeyisnull | has_reference_table_colocation_id | repmodel
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
h | f | 1360005 | s
|
h | f | f | s
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -842,15 +843,15 @@ WHERE
|
||||||
1360015 | f | f
|
1360015 | f | f
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'upgrade_reference_table_mx'::regclass);
|
WHERE logicalrelid = 'upgrade_reference_table_mx'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
1360005 | 1 | 1 | 23 | 0
|
1 | 1 | 23
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -872,14 +873,14 @@ ERROR: cannot upgrade to reference table
|
||||||
DETAIL: Upgrade is only supported for statement-based replicated tables but "upgrade_reference_table_mx" is streaming replicated
|
DETAIL: Upgrade is only supported for statement-based replicated tables but "upgrade_reference_table_mx" is streaming replicated
|
||||||
-- situation after upgrade_reference_table
|
-- situation after upgrade_reference_table
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_mx'::regclass;
|
logicalrelid = 'upgrade_reference_table_mx'::regclass;
|
||||||
partmethod | partkeyisnull | colocationid | repmodel
|
partmethod | partkeyisnull | has_reference_table_colocation_id | repmodel
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
h | f | 1360005 | s
|
h | f | f | s
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -893,15 +894,15 @@ WHERE
|
||||||
1360015 | f | f
|
1360015 | f | f
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'upgrade_reference_table_mx'::regclass);
|
WHERE logicalrelid = 'upgrade_reference_table_mx'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
1360005 | 1 | 1 | 23 | 0
|
1 | 1 | 23
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -941,14 +942,14 @@ SELECT start_metadata_sync_to_node('localhost', :worker_1_port);
|
||||||
|
|
||||||
-- situation before upgrade_reference_table
|
-- situation before upgrade_reference_table
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_mx'::regclass;
|
logicalrelid = 'upgrade_reference_table_mx'::regclass;
|
||||||
partmethod | partkeyisnull | colocationid | repmodel
|
partmethod | partkeyisnull | has_reference_table_colocation_id | repmodel
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
h | f | 1360006 | c
|
h | f | f | c
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -962,15 +963,15 @@ WHERE
|
||||||
1360016 | f | f
|
1360016 | f | f
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'upgrade_reference_table_mx'::regclass);
|
WHERE logicalrelid = 'upgrade_reference_table_mx'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
1360006 | 1 | 2 | 23 | 0
|
1 | 2 | 23
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -996,14 +997,14 @@ SELECT upgrade_to_reference_table('upgrade_reference_table_mx');
|
||||||
|
|
||||||
-- situation after upgrade_reference_table
|
-- situation after upgrade_reference_table
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_mx'::regclass;
|
logicalrelid = 'upgrade_reference_table_mx'::regclass;
|
||||||
partmethod | partkeyisnull | colocationid | repmodel
|
partmethod | partkeyisnull | has_reference_table_colocation_id | repmodel
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
n | t | 10004 | t
|
n | t | t | t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -1017,15 +1018,15 @@ WHERE
|
||||||
1360016 | t | t
|
1360016 | t | t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
FROM pg_dist_partition
|
FROM pg_dist_partition
|
||||||
WHERE logicalrelid = 'upgrade_reference_table_mx'::regclass);
|
WHERE logicalrelid = 'upgrade_reference_table_mx'::regclass);
|
||||||
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
|
shardcount | replicationfactor | distributioncolumntype
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
10004 | 1 | -1 | 0 | 0
|
1 | -1 | 0
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -1045,14 +1046,14 @@ ORDER BY shardid;
|
||||||
-- situation on metadata worker
|
-- situation on metadata worker
|
||||||
\c - - - :worker_1_port
|
\c - - - :worker_1_port
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_mx'::regclass;
|
logicalrelid = 'upgrade_reference_table_mx'::regclass;
|
||||||
partmethod | partkeyisnull | colocationid | repmodel
|
partmethod | partkeyisnull | has_reference_table_colocation_id | repmodel
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
n | t | 10004 | t
|
n | t | t | t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
|
|
@ -151,9 +151,11 @@ SELECT find_shard_interval_index(1300002);
|
||||||
SELECT find_shard_interval_index(1300003);
|
SELECT find_shard_interval_index(1300003);
|
||||||
SELECT find_shard_interval_index(1300016);
|
SELECT find_shard_interval_index(1300016);
|
||||||
|
|
||||||
|
|
||||||
-- check external colocation API
|
-- check external colocation API
|
||||||
|
|
||||||
|
SELECT count(*) FROM pg_dist_partition WHERE colocationid = 4;
|
||||||
|
DELETE FROM pg_dist_colocation WHERE colocationid = 4;
|
||||||
|
|
||||||
SET citus.shard_count = 2;
|
SET citus.shard_count = 2;
|
||||||
|
|
||||||
CREATE TABLE table1_groupA ( id int );
|
CREATE TABLE table1_groupA ( id int );
|
||||||
|
|
|
@ -65,7 +65,7 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
nodeport = :worker_2_port;
|
nodeport = :worker_2_port;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
@ -97,7 +97,7 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
nodeport = :worker_2_port;
|
nodeport = :worker_2_port;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
@ -143,7 +143,7 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
nodeport = :worker_2_port;
|
nodeport = :worker_2_port;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
@ -177,7 +177,7 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
nodeport = :worker_2_port;
|
nodeport = :worker_2_port;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
@ -209,7 +209,7 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
nodeport = :worker_2_port;
|
nodeport = :worker_2_port;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
@ -243,7 +243,7 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
nodeport = :worker_2_port;
|
nodeport = :worker_2_port;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
@ -279,7 +279,7 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
nodeport = :worker_2_port;
|
nodeport = :worker_2_port;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
@ -314,7 +314,7 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
nodeport = :worker_2_port;
|
nodeport = :worker_2_port;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
@ -356,7 +356,7 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
nodeport = :worker_2_port;
|
nodeport = :worker_2_port;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
@ -391,7 +391,7 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
nodeport = :worker_2_port;
|
nodeport = :worker_2_port;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
@ -433,7 +433,7 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
nodeport = :worker_2_port;
|
nodeport = :worker_2_port;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
@ -481,7 +481,7 @@ WHERE
|
||||||
ORDER BY
|
ORDER BY
|
||||||
shardid;
|
shardid;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
@ -514,7 +514,7 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
nodeport = :worker_2_port;
|
nodeport = :worker_2_port;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
@ -553,7 +553,7 @@ WHERE
|
||||||
ORDER BY
|
ORDER BY
|
||||||
shardid;
|
shardid;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
@ -586,7 +586,7 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
nodeport = :worker_2_port;
|
nodeport = :worker_2_port;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
|
|
@ -89,9 +89,11 @@ COPY upgrade_reference_table_append FROM STDIN;
|
||||||
5
|
5
|
||||||
\.
|
\.
|
||||||
|
|
||||||
|
SELECT colocationid AS reference_table_colocationid FROM pg_dist_colocation WHERE distributioncolumntype=0 \gset
|
||||||
|
|
||||||
-- situation before upgrade_reference_table
|
-- situation before upgrade_reference_table
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
|
@ -104,7 +106,7 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_append'::regclass;
|
logicalrelid = 'upgrade_reference_table_append'::regclass;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
@ -127,7 +129,7 @@ SELECT upgrade_to_reference_table('upgrade_reference_table_append');
|
||||||
|
|
||||||
-- situation after upgrade_reference_table
|
-- situation after upgrade_reference_table
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
|
@ -140,7 +142,7 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_append'::regclass;
|
logicalrelid = 'upgrade_reference_table_append'::regclass;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
@ -166,7 +168,7 @@ UPDATE pg_dist_partition SET repmodel='c' WHERE logicalrelid='upgrade_reference_
|
||||||
|
|
||||||
-- situation before upgrade_reference_table
|
-- situation before upgrade_reference_table
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
|
@ -179,7 +181,7 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_one_worker'::regclass;
|
logicalrelid = 'upgrade_reference_table_one_worker'::regclass;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
@ -200,7 +202,7 @@ SELECT upgrade_to_reference_table('upgrade_reference_table_one_worker');
|
||||||
|
|
||||||
-- situation after upgrade_reference_table
|
-- situation after upgrade_reference_table
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
|
@ -213,7 +215,7 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_one_worker'::regclass;
|
logicalrelid = 'upgrade_reference_table_one_worker'::regclass;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
@ -241,7 +243,7 @@ WHERE shardid = (SELECT shardid FROM pg_dist_shard WHERE logicalrelid = 'upgrade
|
||||||
|
|
||||||
-- situation before upgrade_reference_table
|
-- situation before upgrade_reference_table
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
|
@ -254,7 +256,7 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_one_unhealthy'::regclass;
|
logicalrelid = 'upgrade_reference_table_one_unhealthy'::regclass;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
@ -276,7 +278,7 @@ SELECT upgrade_to_reference_table('upgrade_reference_table_one_unhealthy');
|
||||||
|
|
||||||
-- situation after upgrade_reference_table
|
-- situation after upgrade_reference_table
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
|
@ -289,7 +291,7 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_one_unhealthy'::regclass;
|
logicalrelid = 'upgrade_reference_table_one_unhealthy'::regclass;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
@ -315,7 +317,7 @@ SELECT create_distributed_table('upgrade_reference_table_both_healthy', 'column1
|
||||||
|
|
||||||
-- situation before upgrade_reference_table
|
-- situation before upgrade_reference_table
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
|
@ -328,7 +330,7 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_both_healthy'::regclass;
|
logicalrelid = 'upgrade_reference_table_both_healthy'::regclass;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
@ -349,7 +351,7 @@ SELECT upgrade_to_reference_table('upgrade_reference_table_both_healthy');
|
||||||
|
|
||||||
-- situation after upgrade_reference_table
|
-- situation after upgrade_reference_table
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
|
@ -362,7 +364,7 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_both_healthy'::regclass;
|
logicalrelid = 'upgrade_reference_table_both_healthy'::regclass;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
@ -389,7 +391,7 @@ UPDATE pg_dist_partition SET repmodel='c' WHERE logicalrelid='upgrade_reference_
|
||||||
|
|
||||||
-- situation before upgrade_reference_table
|
-- situation before upgrade_reference_table
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
|
@ -402,7 +404,7 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_transaction_rollback'::regclass;
|
logicalrelid = 'upgrade_reference_table_transaction_rollback'::regclass;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
@ -425,7 +427,7 @@ ROLLBACK;
|
||||||
|
|
||||||
-- situation after upgrade_reference_table
|
-- situation after upgrade_reference_table
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
|
@ -438,7 +440,7 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_transaction_rollback'::regclass;
|
logicalrelid = 'upgrade_reference_table_transaction_rollback'::regclass;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
@ -466,7 +468,7 @@ UPDATE pg_dist_partition SET repmodel='c' WHERE logicalrelid='upgrade_reference_
|
||||||
|
|
||||||
-- situation before upgrade_reference_table
|
-- situation before upgrade_reference_table
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
|
@ -479,7 +481,7 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_transaction_commit'::regclass;
|
logicalrelid = 'upgrade_reference_table_transaction_commit'::regclass;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
@ -502,7 +504,7 @@ COMMIT;
|
||||||
|
|
||||||
-- situation after upgrade_reference_table
|
-- situation after upgrade_reference_table
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
|
@ -515,7 +517,7 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_transaction_commit'::regclass;
|
logicalrelid = 'upgrade_reference_table_transaction_commit'::regclass;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
@ -548,7 +550,7 @@ SELECT create_distributed_table('upgrade_reference_table_mx', 'column1');
|
||||||
|
|
||||||
-- verify that streaming replicated tables cannot be upgraded to reference tables
|
-- verify that streaming replicated tables cannot be upgraded to reference tables
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
|
@ -561,7 +563,7 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_mx'::regclass;
|
logicalrelid = 'upgrade_reference_table_mx'::regclass;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
@ -584,7 +586,7 @@ SELECT upgrade_to_reference_table('upgrade_reference_table_mx');
|
||||||
|
|
||||||
-- situation after upgrade_reference_table
|
-- situation after upgrade_reference_table
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
|
@ -597,7 +599,7 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_mx'::regclass;
|
logicalrelid = 'upgrade_reference_table_mx'::regclass;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
@ -630,7 +632,7 @@ SELECT start_metadata_sync_to_node('localhost', :worker_1_port);
|
||||||
|
|
||||||
-- situation before upgrade_reference_table
|
-- situation before upgrade_reference_table
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
|
@ -643,7 +645,7 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_mx'::regclass;
|
logicalrelid = 'upgrade_reference_table_mx'::regclass;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
@ -666,7 +668,7 @@ SELECT upgrade_to_reference_table('upgrade_reference_table_mx');
|
||||||
|
|
||||||
-- situation after upgrade_reference_table
|
-- situation after upgrade_reference_table
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
|
@ -679,7 +681,7 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
logicalrelid = 'upgrade_reference_table_mx'::regclass;
|
logicalrelid = 'upgrade_reference_table_mx'::regclass;
|
||||||
|
|
||||||
SELECT *
|
SELECT shardcount, replicationfactor, distributioncolumntype
|
||||||
FROM pg_dist_colocation
|
FROM pg_dist_colocation
|
||||||
WHERE colocationid IN
|
WHERE colocationid IN
|
||||||
(SELECT colocationid
|
(SELECT colocationid
|
||||||
|
@ -699,7 +701,7 @@ ORDER BY shardid;
|
||||||
-- situation on metadata worker
|
-- situation on metadata worker
|
||||||
\c - - - :worker_1_port
|
\c - - - :worker_1_port
|
||||||
SELECT
|
SELECT
|
||||||
partmethod, (partkey IS NULL) as partkeyisnull, colocationid, repmodel
|
partmethod, (partkey IS NULL) as partkeyisnull, colocationid = :reference_table_colocationid AS has_reference_table_colocation_id, repmodel
|
||||||
FROM
|
FROM
|
||||||
pg_dist_partition
|
pg_dist_partition
|
||||||
WHERE
|
WHERE
|
||||||
|
|
Loading…
Reference in New Issue