make check: 4 of 287 tests failed
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal
$ psql --version
psql (PostgreSQL) 13.2 (Ubuntu 13.2-1.pgdg20.04+1)
$ cat regression.diffs
diff -dU10 -w /tmp/citus/src/test/regress/expected/multi_extension.out /tmp/citus/src/test/regress/results/multi_extension.out
--- /tmp/citus/src/test/regress/expected/multi_extension.out.modified 2021-04-26 20:34:54.140786239 +0000
+++ /tmp/citus/src/test/regress/results/multi_extension.out.modified 2021-04-26 20:34:54.160788459 +0000
@@ -317,139 +317,139 @@
| view citus_shard_indexes_on_worker
| view citus_shards_on_worker
| view citus_stat_statements
| view citus_worker_stat_activity
| view pg_dist_shard_placement
(188 rows)
-- Test downgrade to 9.2-2 from 9.2-4
ALTER EXTENSION citus UPDATE TO '9.2-4';
ALTER EXTENSION citus UPDATE TO '9.2-2';
+ERROR: extension "citus" has no update path from version "9.2-4" to version "9.2-2"
-- Should be empty result since upgrade+downgrade should be a no-op
SELECT * FROM print_extension_changes();
previous_object | current_object
-----------------+----------------
(0 rows)
/*
* As we mistakenly bumped schema version to 9.3-1 in a bad release, we support
* updating citus schema from 9.3-1 to 9.2-4, but we do not support updates to 9.3-1.
*
* Hence the query below should fail.
*/
ALTER EXTENSION citus UPDATE TO '9.3-1';
-ERROR: extension "citus" has no update path from version "9.2-2" to version "9.3-1"
+ERROR: extension "citus" has no update path from version "9.2-4" to version "9.3-1"
ALTER EXTENSION citus UPDATE TO '9.2-4';
+NOTICE: version "9.2-4" of extension "citus" is already installed
-- Snapshot of state at 9.2-4
SELECT * FROM print_extension_changes();
previous_object | current_object
-----------------+----------------
(0 rows)
-- Test downgrade to 9.2-4 from 9.3-2
ALTER EXTENSION citus UPDATE TO '9.3-2';
ALTER EXTENSION citus UPDATE TO '9.2-4';
+ERROR: extension "citus" has no update path from version "9.3-2" to version "9.2-4"
-- Should be empty result since upgrade+downgrade should be a no-op
SELECT * FROM print_extension_changes();
previous_object | current_object
-----------------+-----------------------------------------------------------------
-(0 rows)
-
--- Snapshot of state at 9.3-2
-ALTER EXTENSION citus UPDATE TO '9.3-2';
-SELECT * FROM print_extension_changes();
- previous_object | current_object
----------------------------------------------------------------------
| function citus_remote_connection_stats()
| function replicate_reference_tables()
| function truncate_local_data_after_distributing_table(regclass)
| function update_distributed_table_colocation(regclass,text)
| function worker_create_or_alter_role(text,text,text)
(5 rows)
--- Test downgrade to 9.3-2 from 9.4-1
-ALTER EXTENSION citus UPDATE TO '9.4-1';
+-- Snapshot of state at 9.3-2
ALTER EXTENSION citus UPDATE TO '9.3-2';
--- Should be empty result since upgrade+downgrade should be a no-op
+NOTICE: version "9.3-2" of extension "citus" is already installed
SELECT * FROM print_extension_changes();
previous_object | current_object
-----------------+----------------
(0 rows)
--- Snapshot of state at 9.4-1
+-- Test downgrade to 9.3-2 from 9.4-1
ALTER EXTENSION citus UPDATE TO '9.4-1';
+ALTER EXTENSION citus UPDATE TO '9.3-2';
+ERROR: extension "citus" has no update path from version "9.4-1" to version "9.3-2"
+-- Should be empty result since upgrade+downgrade should be a no-op
SELECT * FROM print_extension_changes();
previous_object | current_object
-----------------+--------------------------------------------------------
| function worker_last_saved_explain_analyze()
| function worker_save_query_explain_analyze(text,jsonb)
(2 rows)
+-- Snapshot of state at 9.4-1
+ALTER EXTENSION citus UPDATE TO '9.4-1';
+NOTICE: version "9.4-1" of extension "citus" is already installed
+SELECT * FROM print_extension_changes();
+ previous_object | current_object
+-----------------+----------------
+(0 rows)
+
-- Test downgrade to 9.4-1 from 9.5-1
ALTER EXTENSION citus UPDATE TO '9.5-1';
BEGIN;
SELECT master_add_node('localhost', :master_port, groupId=>0);
master_add_node
-----------------
1
(1 row)
CREATE TABLE citus_local_table (a int);
SELECT create_citus_local_table('citus_local_table');
NOTICE: create_citus_local_table is deprecated in favour of citus_add_local_table_to_metadata
create_citus_local_table
--------------------------
(1 row)
-- downgrade from 9.5-1 to 9.4-1 should fail as we have a citus local table
ALTER EXTENSION citus UPDATE TO '9.4-1';
-ERROR: citus local tables are introduced in Citus 9.5
-HINT: To downgrade Citus to an older version, you should first convert each citus local table to a postgres table by executing SELECT undistribute_table("%s")
-CONTEXT: PL/pgSQL function inline_code_block line 11 at RAISE
+ERROR: extension "citus" has no update path from version "9.5-1" to version "9.4-1"
ROLLBACK;
-- now we can downgrade as there is no citus local table
ALTER EXTENSION citus UPDATE TO '9.4-1';
+ERROR: extension "citus" has no update path from version "9.5-1" to version "9.4-1"
-- Should be empty result since upgrade+downgrade should be a no-op
SELECT * FROM print_extension_changes();
previous_object | current_object
---------------------------------------------------------------------+--------------------------------------------------------------------
-(0 rows)
-
--- Snapshot of state at 9.5-1
-ALTER EXTENSION citus UPDATE TO '9.5-1';
-SELECT * FROM print_extension_changes();
- previous_object | current_object
----------------------------------------------------------------------
function master_drop_sequences(text[]) |
function task_tracker_assign_task(bigint,integer,text) |
function task_tracker_cleanup_job(bigint) |
function task_tracker_conninfo_cache_invalidate() |
function task_tracker_task_status(bigint,integer) |
function worker_execute_sql_task(bigint,integer,text,boolean) |
function worker_merge_files_and_run_query(bigint,integer,text,text) |
| function create_citus_local_table(regclass)
| function undistribute_table(regclass)
| function worker_record_sequence_dependency(regclass,regclass,name)
(10 rows)
--- Test downgrade to 9.5-1 from 10.0-1
-ALTER EXTENSION citus UPDATE TO '10.0-1';
+-- Snapshot of state at 9.5-1
ALTER EXTENSION citus UPDATE TO '9.5-1';
--- Should be empty result since upgrade+downgrade should be a no-op
+NOTICE: version "9.5-1" of extension "citus" is already installed
SELECT * FROM print_extension_changes();
previous_object | current_object
-----------------+----------------
(0 rows)
--- Snapshot of state at 10.0-1
+-- Test downgrade to 9.5-1 from 10.0-1
ALTER EXTENSION citus UPDATE TO '10.0-1';
+ALTER EXTENSION citus UPDATE TO '9.5-1';
+ERROR: extension "citus" has no update path from version "10.0-1" to version "9.5-1"
+-- Should be empty result since upgrade+downgrade should be a no-op
SELECT * FROM print_extension_changes();
previous_object | current_object
---------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------
function citus_total_relation_size(regclass) |
function create_citus_local_table(regclass) |
function mark_tables_colocated(regclass,regclass[]) |
function master_conninfo_cache_invalidate() |
function master_create_distributed_table(regclass,text,citus.distribution_type) |
function master_create_worker_shards(text,integer,integer) |
function master_dist_local_group_cache_invalidate() |
@@ -508,75 +508,89 @@
| sequence columnar.storageid_seq
| table columnar.chunk
| table columnar.chunk_group
| table columnar.options
| table columnar.stripe
| view citus_shards
| view citus_tables
| view time_partitions
(67 rows)
+-- Snapshot of state at 10.0-1
+ALTER EXTENSION citus UPDATE TO '10.0-1';
+NOTICE: version "10.0-1" of extension "citus" is already installed
+SELECT * FROM print_extension_changes();
+ previous_object | current_object
+-----------------+----------------
+(0 rows)
+
-- Test downgrade to 10.0-1 from 10.0-2
ALTER EXTENSION citus UPDATE TO '10.0-2';
ALTER EXTENSION citus UPDATE TO '10.0-1';
+ERROR: extension "citus" has no update path from version "10.0-2" to version "10.0-1"
-- Should be empty result since upgrade+downgrade should be a no-op
SELECT * FROM print_extension_changes();
previous_object | current_object
-----------------+----------------
(0 rows)
-- Snapshot of state at 10.0-2
ALTER EXTENSION citus UPDATE TO '10.0-2';
+NOTICE: version "10.0-2" of extension "citus" is already installed
SELECT * FROM print_extension_changes();
previous_object | current_object
-----------------+----------------
(0 rows)
-- Test downgrade to 10.0-2 from 10.0-3
ALTER EXTENSION citus UPDATE TO '10.0-3';
ALTER EXTENSION citus UPDATE TO '10.0-2';
+ERROR: extension "citus" has no update path from version "10.0-3" to version "10.0-2"
-- Should be empty result since upgrade+downgrade should be a no-op
SELECT * FROM print_extension_changes();
previous_object | current_object
-----------------+------------------------------------------
-(0 rows)
+ | function citus_get_active_worker_nodes()
+(1 row)
-- Snapshot of state at 10.0-3
ALTER EXTENSION citus UPDATE TO '10.0-3';
+NOTICE: version "10.0-3" of extension "citus" is already installed
SELECT * FROM print_extension_changes();
previous_object | current_object
-----------------+----------------
- | function citus_get_active_worker_nodes()
-(1 row)
+(0 rows)
-- Test downgrade to 10.0-3 from 10.1-1
ALTER EXTENSION citus UPDATE TO '10.1-1';
ALTER EXTENSION citus UPDATE TO '10.0-3';
+ERROR: extension "citus" has no update path from version "10.1-1" to version "10.0-3"
-- Should be empty result since upgrade+downgrade should be a no-op
SELECT * FROM print_extension_changes();
previous_object | current_object
-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------
-(0 rows)
-
--- Snapshot of state at 10.1-1
-ALTER EXTENSION citus UPDATE TO '10.1-1';
-SELECT * FROM print_extension_changes();
- previous_object | current_object
----------------------------------------------------------------------
function citus_internal.columnar_ensure_objects_exist() |
function create_distributed_table(regclass,text,citus.distribution_type,text) |
| function create_distributed_table(regclass,text,citus.distribution_type,text,integer)
| function worker_partitioned_relation_size(regclass)
| function worker_partitioned_relation_total_size(regclass)
| function worker_partitioned_table_size(regclass)
(6 rows)
+-- Snapshot of state at 10.1-1
+ALTER EXTENSION citus UPDATE TO '10.1-1';
+NOTICE: version "10.1-1" of extension "citus" is already installed
+SELECT * FROM print_extension_changes();
+ previous_object | current_object
+-----------------+----------------
+(0 rows)
+
DROP TABLE prev_objects, extension_diff;
-- show running version
SHOW citus.version;
citus.version
---------------
10.1devel
(1 row)
-- ensure no unexpected objects were created outside pg_catalog
SELECT pgio.type, pgio.identity
diff -dU10 -w /tmp/citus/src/test/regress/expected/multi_partitioning.out /tmp/citus/src/test/regress/results/multi_partitioning.out
--- /tmp/citus/src/test/regress/expected/multi_partitioning.out.modified 2021-04-26 20:35:36.368624520 +0000
+++ /tmp/citus/src/test/regress/results/multi_partitioning.out.modified 2021-04-26 20:35:36.404627314 +0000
@@ -614,21 +614,21 @@
name | type
------------+---------
id | integer
new_column | integer
time | date
(3 rows)
-- test add PRIMARY KEY
-- add PRIMARY KEY to partitioned table - this will error out
ALTER TABLE partitioning_test ADD CONSTRAINT partitioning_primary PRIMARY KEY (id);
-ERROR: insufficient columns in PRIMARY KEY constraint definition
+ERROR: unique constraint on partitioned table must include all partitioning columns
DETAIL: PRIMARY KEY constraint on table "partitioning_test" lacks column "time" which is part of the partition key.
-- ADD PRIMARY KEY to partition
ALTER TABLE partitioning_test_2009 ADD CONSTRAINT partitioning_2009_primary PRIMARY KEY (id);
-- see PRIMARY KEY is created
SELECT
table_name,
constraint_name,
constraint_type
FROM
information_schema.table_constraints
@@ -1943,26 +1943,26 @@
FOR VALUES FROM ('2009-01-01') TO ('2010-01-01');
-- Attach a table which doesn't have the constraint
ALTER TABLE partitioning_test ATTACH PARTITION partitioning_test_2010
FOR VALUES FROM ('2010-01-01') TO ('2011-01-01');
-- Attach a table which has a different constraint
ALTER TABLE partitioning_test ATTACH PARTITION partitioning_test_2011
FOR VALUES FROM ('2011-01-01') TO ('2012-01-01');
SELECT parent_table, partition_column, partition, from_value, to_value FROM time_partitions;
parent_table | partition_column | partition | from_value | to_value
------------------------------------------+------------------+--------------------------------------------+------------+------------
- "schema-test" | time | "schema-test_2009" | 01-01-2009 | 01-01-2010
partitioning_test | time | partitioning_test_2008 | 01-01-2008 | 01-01-2009
partitioning_test | time | partitioning_test_2009 | 01-01-2009 | 01-01-2010
partitioning_test | time | partitioning_test_2010 | 01-01-2010 | 01-01-2011
partitioning_test | time | partitioning_test_2011 | 01-01-2011 | 01-01-2012
public.non_distributed_partitioned_table | a | public.non_distributed_partitioned_table_1 | 0 | 10
+ "schema-test" | time | "schema-test_2009" | 01-01-2009 | 01-01-2010
(6 rows)
-- create the same partition to verify it behaves like in plain PG
CREATE TABLE partitioning_test_2011 PARTITION OF partitioning_test FOR VALUES FROM ('2011-01-01') TO ('2012-01-01');
ERROR: relation "partitioning_test_2011" already exists
CREATE TABLE IF NOT EXISTS partitioning_test_2011 PARTITION OF partitioning_test FOR VALUES FROM ('2011-01-01') TO ('2012-01-01');
NOTICE: relation "partitioning_test_2011" already exists, skipping
-- verify we can create a partition that doesn't already exist with IF NOT EXISTS
CREATE TABLE IF NOT EXISTS partitioning_test_2013 PARTITION OF partitioning_test FOR VALUES FROM ('2013-01-01') TO ('2014-01-01');
SELECT logicalrelid FROM pg_dist_partition WHERE logicalrelid IN ('partitioning_test', 'partitioning_test_2013') ORDER BY 1;
diff -dU10 -w /tmp/citus/src/test/regress/expected/pg13.out /tmp/citus/src/test/regress/results/pg13.out
--- /tmp/citus/src/test/regress/expected/pg13.out.modified 2021-04-26 20:36:45.661508394 +0000
+++ /tmp/citus/src/test/regress/results/pg13.out.modified 2021-04-26 20:36:45.669508929 +0000
@@ -126,22 +126,22 @@
-- test unicode escape
-- insert the word 'data' with unicode escapes
INSERT INTO text_table VALUES(U&'d\0061t\+000061');
-- insert the word слон
INSERT INTO text_table VALUES(U&'\0441\043B\043E\043D');
SELECT * FROM text_table ORDER BY 1;
name
------
abc
äbc
- data
äbc
+ data
слон
(5 rows)
-- Test that we don't propagate base types
CREATE TYPE myvarchar;
CREATE FUNCTION myvarcharin(cstring, oid, integer) RETURNS myvarchar
LANGUAGE internal IMMUTABLE PARALLEL SAFE STRICT AS 'varcharin';
NOTICE: return type myvarchar is only a shell
CREATE FUNCTION myvarcharout(myvarchar) RETURNS cstring
LANGUAGE internal IMMUTABLE PARALLEL SAFE STRICT AS 'varcharout';
diff -dU10 -w /tmp/citus/src/test/regress/expected/alter_distributed_table.out /tmp/citus/src/test/regress/results/alter_distributed_table.out
--- /tmp/citus/src/test/regress/expected/alter_distributed_table.out.modified 2021-04-26 20:38:21.748112266 +0000
+++ /tmp/citus/src/test/regress/results/alter_distributed_table.out.modified 2021-04-26 20:38:21.772110402 +0000
@@ -125,22 +125,22 @@
--------------------+------------------+---------------------+-------------
colocation_table | distributed | a | 4
colocation_table_2 | distributed | a | 4
dist_table | distributed | b | 4
(3 rows)
SELECT STRING_AGG(table_name::text, ', ' ORDER BY 1) AS "Colocation Groups" FROM public.citus_tables
WHERE table_name IN ('dist_table', 'colocation_table', 'colocation_table_2') GROUP BY colocation_id ORDER BY 1;
Colocation Groups
------------------------------
- colocation_table, dist_table
colocation_table_2
+ colocation_table, dist_table
(2 rows)
-- test altering shard count with cascading, note that the colocation will be kept
SELECT alter_distributed_table('dist_table', shard_count := 8, cascade_to_colocated := true);
NOTICE: creating a new table for alter_distributed_table.dist_table
NOTICE: moving the data of alter_distributed_table.dist_table
NOTICE: dropping the old alter_distributed_table.dist_table
NOTICE: renaming the new table to alter_distributed_table.dist_table
NOTICE: creating a new table for alter_distributed_table.colocation_table
NOTICE: moving the data of alter_distributed_table.colocation_table
@@ -157,22 +157,22 @@
--------------------+------------------+---------------------+-------------
colocation_table | distributed | a | 8
colocation_table_2 | distributed | a | 4
dist_table | distributed | b | 8
(3 rows)
SELECT STRING_AGG(table_name::text, ', ' ORDER BY 1) AS "Colocation Groups" FROM public.citus_tables
WHERE table_name IN ('dist_table', 'colocation_table', 'colocation_table_2') GROUP BY colocation_id ORDER BY 1;
Colocation Groups
------------------------------
- colocation_table, dist_table
colocation_table_2
+ colocation_table, dist_table
(2 rows)
-- test altering shard count without cascading, note that the colocation will be broken
SELECT alter_distributed_table('dist_table', shard_count := 10, cascade_to_colocated := false);
NOTICE: creating a new table for alter_distributed_table.dist_table
NOTICE: moving the data of alter_distributed_table.dist_table
NOTICE: dropping the old alter_distributed_table.dist_table
NOTICE: renaming the new table to alter_distributed_table.dist_table
alter_distributed_table
-------------------------
postgres@pithub:/tmp/citus/src/test/regress$
Contributor guide
Assessment
This issue has not been assessed yet.