From d0fa10a98cf304cbf09f0efbdd68415689e33847 Mon Sep 17 00:00:00 2001 From: Ahmet Gedemenli Date: Fri, 30 Sep 2022 14:47:42 +0300 Subject: [PATCH] Bump Citus to 11.2devel (#6385) --- configure | 18 +++++++-------- configure.ac | 2 +- src/backend/columnar/citus_columnar.control | 2 +- .../sql/citus_columnar--11.1-1--11.2-1.sql | 1 + .../citus_columnar--11.2-1--11.1-1.sql | 1 + src/backend/distributed/citus.control | 2 +- .../distributed/sql/citus--11.1-1--11.2-1.sql | 3 +++ .../sql/downgrades/citus--11.2-1--11.1-1.sql | 1 + src/test/regress/citus_tests/config.py | 2 +- src/test/regress/expected/multi_extension.out | 22 ++++++++++++++++--- .../multi_fix_partition_shard_index_names.out | 4 ++-- src/test/regress/sql/multi_extension.sql | 10 +++++++++ 12 files changed, 50 insertions(+), 18 deletions(-) create mode 100644 src/backend/columnar/sql/citus_columnar--11.1-1--11.2-1.sql create mode 100644 src/backend/columnar/sql/downgrades/citus_columnar--11.2-1--11.1-1.sql create mode 100644 src/backend/distributed/sql/citus--11.1-1--11.2-1.sql create mode 100644 src/backend/distributed/sql/downgrades/citus--11.2-1--11.1-1.sql diff --git a/configure b/configure index 4c53cffb5..d17d2caad 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Citus 11.1devel. +# Generated by GNU Autoconf 2.69 for Citus 11.2devel. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -579,8 +579,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Citus' PACKAGE_TARNAME='citus' -PACKAGE_VERSION='11.1devel' -PACKAGE_STRING='Citus 11.1devel' +PACKAGE_VERSION='11.2devel' +PACKAGE_STRING='Citus 11.2devel' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1262,7 +1262,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Citus 11.1devel to adapt to many kinds of systems. +\`configure' configures Citus 11.2devel to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1324,7 +1324,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Citus 11.1devel:";; + short | recursive ) echo "Configuration of Citus 11.2devel:";; esac cat <<\_ACEOF @@ -1429,7 +1429,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Citus configure 11.1devel +Citus configure 11.2devel generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1912,7 +1912,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Citus $as_me 11.1devel, which was +It was created by Citus $as_me 11.2devel, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -5393,7 +5393,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Citus $as_me 11.1devel, which was +This file was extended by Citus $as_me 11.2devel, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5455,7 +5455,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Citus config.status 11.1devel +Citus config.status 11.2devel configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 7c1ab8c73..75cf2cf71 100644 --- a/configure.ac +++ b/configure.ac @@ -5,7 +5,7 @@ # everyone needing autoconf installed, the resulting files are checked # into the SCM. -AC_INIT([Citus], [11.1devel]) +AC_INIT([Citus], [11.2devel]) AC_COPYRIGHT([Copyright (c) Citus Data, Inc.]) # we'll need sed and awk for some of the version commands diff --git a/src/backend/columnar/citus_columnar.control b/src/backend/columnar/citus_columnar.control index eaa349136..d60a71bad 100644 --- a/src/backend/columnar/citus_columnar.control +++ b/src/backend/columnar/citus_columnar.control @@ -1,6 +1,6 @@ # Columnar extension comment = 'Citus Columnar extension' -default_version = '11.1-1' +default_version = '11.2-1' module_pathname = '$libdir/citus_columnar' relocatable = false schema = pg_catalog diff --git a/src/backend/columnar/sql/citus_columnar--11.1-1--11.2-1.sql b/src/backend/columnar/sql/citus_columnar--11.1-1--11.2-1.sql new file mode 100644 index 000000000..60a0401d5 --- /dev/null +++ b/src/backend/columnar/sql/citus_columnar--11.1-1--11.2-1.sql @@ -0,0 +1 @@ +-- citus_columnar--11.1-1--11.2-1 diff --git a/src/backend/columnar/sql/downgrades/citus_columnar--11.2-1--11.1-1.sql b/src/backend/columnar/sql/downgrades/citus_columnar--11.2-1--11.1-1.sql new file mode 100644 index 000000000..9acf68da3 --- /dev/null +++ b/src/backend/columnar/sql/downgrades/citus_columnar--11.2-1--11.1-1.sql @@ -0,0 +1 @@ +-- citus_columnar--11.2-1--11.1-1 diff --git a/src/backend/distributed/citus.control b/src/backend/distributed/citus.control index 996aaeb57..0d6bb3a9b 100644 --- a/src/backend/distributed/citus.control +++ b/src/backend/distributed/citus.control @@ -1,6 +1,6 @@ # Citus extension comment = 'Citus distributed database' -default_version = '11.1-1' +default_version = '11.2-1' module_pathname = '$libdir/citus' relocatable = false schema = pg_catalog diff --git a/src/backend/distributed/sql/citus--11.1-1--11.2-1.sql b/src/backend/distributed/sql/citus--11.1-1--11.2-1.sql new file mode 100644 index 000000000..8684ce196 --- /dev/null +++ b/src/backend/distributed/sql/citus--11.1-1--11.2-1.sql @@ -0,0 +1,3 @@ +-- citus--11.1-1--11.2-1 + +-- bump version to 11.2-1 diff --git a/src/backend/distributed/sql/downgrades/citus--11.2-1--11.1-1.sql b/src/backend/distributed/sql/downgrades/citus--11.2-1--11.1-1.sql new file mode 100644 index 000000000..eb8106a6a --- /dev/null +++ b/src/backend/distributed/sql/downgrades/citus--11.2-1--11.1-1.sql @@ -0,0 +1 @@ +-- citus--11.2-1--11.1-1 diff --git a/src/test/regress/citus_tests/config.py b/src/test/regress/citus_tests/config.py index 207279f92..faa226f39 100644 --- a/src/test/regress/citus_tests/config.py +++ b/src/test/regress/citus_tests/config.py @@ -38,7 +38,7 @@ CITUS_ARBITRARY_TEST_DIR = "./tmp_citus_test" MASTER = "master" # This should be updated when citus version changes -MASTER_VERSION = "11.1" +MASTER_VERSION = "11.2" HOME = expanduser("~") diff --git a/src/test/regress/expected/multi_extension.out b/src/test/regress/expected/multi_extension.out index c26a65497..d2ae5a79b 100644 --- a/src/test/regress/expected/multi_extension.out +++ b/src/test/regress/expected/multi_extension.out @@ -1172,12 +1172,28 @@ SELECT * FROM multi_extension.print_extension_changes(); | view citus_locks (57 rows) +-- Test downgrade to 11.1-1 from 11.2-1 +ALTER EXTENSION citus UPDATE TO '11.2-1'; +ALTER EXTENSION citus UPDATE TO '11.1-1'; +-- Should be empty result since upgrade+downgrade should be a no-op +SELECT * FROM multi_extension.print_extension_changes(); + previous_object | current_object +--------------------------------------------------------------------- +(0 rows) + +-- Snapshot of state at 11.2-1 +ALTER EXTENSION citus UPDATE TO '11.2-1'; +SELECT * FROM multi_extension.print_extension_changes(); + previous_object | current_object +--------------------------------------------------------------------- +(0 rows) + DROP TABLE multi_extension.prev_objects, multi_extension.extension_diff; -- show running version SHOW citus.version; citus.version --------------------------------------------------------------------- - 11.1devel + 11.2devel (1 row) -- ensure no unexpected objects were created outside pg_catalog @@ -1202,7 +1218,7 @@ DROP EXTENSION citus; DROP EXTENSION citus_columnar; CREATE EXTENSION citus VERSION '8.0-1'; ERROR: specified version incompatible with loaded Citus library -DETAIL: Loaded library requires 11.1, but 8.0-1 was specified. +DETAIL: Loaded library requires 11.2, but 8.0-1 was specified. HINT: If a newer library is present, restart the database and try the command again. -- Test non-distributed queries work even in version mismatch SET citus.enable_version_checks TO 'false'; @@ -1247,7 +1263,7 @@ ORDER BY 1; -- We should not distribute table in version mistmatch SELECT create_distributed_table('version_mismatch_table', 'column1'); ERROR: loaded Citus library version differs from installed extension version -DETAIL: Loaded library requires 11.1, but the installed extension version is 8.1-1. +DETAIL: Loaded library requires 11.2, but the installed extension version is 8.1-1. HINT: Run ALTER EXTENSION citus UPDATE and try again. -- This function will cause fail in next ALTER EXTENSION CREATE OR REPLACE FUNCTION pg_catalog.relation_is_a_known_shard(regclass) diff --git a/src/test/regress/expected/multi_fix_partition_shard_index_names.out b/src/test/regress/expected/multi_fix_partition_shard_index_names.out index 2c7331274..f07715b15 100644 --- a/src/test/regress/expected/multi_fix_partition_shard_index_names.out +++ b/src/test/regress/expected/multi_fix_partition_shard_index_names.out @@ -649,7 +649,7 @@ NOTICE: issuing BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED;SELECT assign_ DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx NOTICE: issuing SET citus.enable_ddl_propagation TO 'off' DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx -NOTICE: issuing CREATE EXTENSION IF NOT EXISTS citus_columnar WITH SCHEMA pg_catalog VERSION "11.1-1"; +NOTICE: issuing CREATE EXTENSION IF NOT EXISTS citus_columnar WITH SCHEMA pg_catalog VERSION "11.2-1"; DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx NOTICE: issuing COMMIT DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx @@ -657,7 +657,7 @@ NOTICE: issuing BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED;SELECT assign_ DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx NOTICE: issuing SET citus.enable_ddl_propagation TO 'off' DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx -NOTICE: issuing CREATE EXTENSION IF NOT EXISTS citus_columnar WITH SCHEMA pg_catalog VERSION "11.1-1"; +NOTICE: issuing CREATE EXTENSION IF NOT EXISTS citus_columnar WITH SCHEMA pg_catalog VERSION "11.2-1"; DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx NOTICE: issuing COMMIT DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx diff --git a/src/test/regress/sql/multi_extension.sql b/src/test/regress/sql/multi_extension.sql index a911542b2..59c67b2b0 100644 --- a/src/test/regress/sql/multi_extension.sql +++ b/src/test/regress/sql/multi_extension.sql @@ -515,6 +515,16 @@ CREATE EXTENSION citus; ALTER EXTENSION citus UPDATE TO '11.1-1'; SELECT * FROM multi_extension.print_extension_changes(); +-- Test downgrade to 11.1-1 from 11.2-1 +ALTER EXTENSION citus UPDATE TO '11.2-1'; +ALTER EXTENSION citus UPDATE TO '11.1-1'; +-- Should be empty result since upgrade+downgrade should be a no-op +SELECT * FROM multi_extension.print_extension_changes(); + +-- Snapshot of state at 11.2-1 +ALTER EXTENSION citus UPDATE TO '11.2-1'; +SELECT * FROM multi_extension.print_extension_changes(); + DROP TABLE multi_extension.prev_objects, multi_extension.extension_diff; -- show running version