From e63435def5748ed2c5ee9604709148ed964fdfa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96nder=20Kalac=C4=B1?= Date: Tue, 31 Mar 2020 09:18:25 +0200 Subject: [PATCH] Downgrade from 9.3-1 to 9.2-4 AND upgrade from 9.2-2 to 9.2-4 (#3673) * Downgrade from 9.3-1 to 9.2-4 AND upgrade from 9.2-2 to 9.2-4 We have accidentally tagged master branch with v9.2-3. However master branch was already bumped to v9.3-1, with this commit, we are undoing the catalog changes that have happened between 9.2-2 to 9.3-1, and making 9.2-4 as the release that we can use as the continuation of 9.2 series. Similarly, we have a path to upgrade from 9.2-2 to 9.2-4 --- configure | 35 +++++++------------ configure.in | 2 +- src/backend/distributed/citus.control | 2 +- .../distributed/sql/citus--9.2-2--9.2-4.sql | 2 ++ .../distributed/sql/citus--9.3-1--9.2-4.sql | 18 ++++++++++ src/test/regress/expected/multi_extension.out | 12 ++++++- src/test/regress/sql/multi_extension.sql | 10 +++++- 7 files changed, 54 insertions(+), 27 deletions(-) create mode 100644 src/backend/distributed/sql/citus--9.2-2--9.2-4.sql create mode 100644 src/backend/distributed/sql/citus--9.3-1--9.2-4.sql diff --git a/configure b/configure index cf79e7d7f..a89b94155 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 9.2.3. +# Generated by GNU Autoconf 2.69 for Citus 9.2.4. # # # 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='9.2.3' -PACKAGE_STRING='Citus 9.2.3' +PACKAGE_VERSION='9.2.4' +PACKAGE_STRING='Citus 9.2.4' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -664,7 +664,6 @@ infodir docdir oldincludedir includedir -runstatedir localstatedir sharedstatedir sysconfdir @@ -741,7 +740,6 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -994,15 +992,6 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1140,7 +1129,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir + libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1253,7 +1242,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 9.2.3 to adapt to many kinds of systems. +\`configure' configures Citus 9.2.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1293,7 +1282,6 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1302,7 +1290,8 @@ Fine tuning of the installation directories: --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/citus] + --docdir=DIR documentation root + [DATAROOTDIR/doc/citus-enterprise] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] @@ -1315,7 +1304,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Citus 9.2.3:";; + short | recursive ) echo "Configuration of Citus 9.2.4:";; esac cat <<\_ACEOF @@ -1415,7 +1404,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Citus configure 9.2.3 +Citus configure 9.2.4 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1898,7 +1887,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 9.2.3, which was +It was created by Citus $as_me 9.2.4, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -5067,7 +5056,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 9.2.3, which was +This file was extended by Citus $as_me 9.2.4, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5129,7 +5118,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 9.2.3 +Citus config.status 9.2.4 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.in b/configure.in index 0d682988a..06e80fda4 100644 --- a/configure.in +++ b/configure.in @@ -5,7 +5,7 @@ # everyone needing autoconf installed, the resulting files are checked # into the SCM. -AC_INIT([Citus], [9.2.3]) +AC_INIT([Citus], [9.2.4]) AC_COPYRIGHT([Copyright (c) Citus Data, Inc.]) # we'll need sed and awk for some of the version commands diff --git a/src/backend/distributed/citus.control b/src/backend/distributed/citus.control index a393c7114..f1310dd3d 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 = '9.2-2' +default_version = '9.2-4' module_pathname = '$libdir/citus' relocatable = false schema = pg_catalog diff --git a/src/backend/distributed/sql/citus--9.2-2--9.2-4.sql b/src/backend/distributed/sql/citus--9.2-2--9.2-4.sql new file mode 100644 index 000000000..ee91f0823 --- /dev/null +++ b/src/backend/distributed/sql/citus--9.2-2--9.2-4.sql @@ -0,0 +1,2 @@ +/* we've some issues with versioning, and we're fixing it by bumping version */ +/* from 9.2-2 to 9.2-4 see #3673 for details */ diff --git a/src/backend/distributed/sql/citus--9.3-1--9.2-4.sql b/src/backend/distributed/sql/citus--9.3-1--9.2-4.sql new file mode 100644 index 000000000..460807c06 --- /dev/null +++ b/src/backend/distributed/sql/citus--9.3-1--9.2-4.sql @@ -0,0 +1,18 @@ +/* citus--9.3-1--9.2-4 */ +/* this is an unusual upgrade path, we are doing it because */ +/* we have accidentally tagged master branch with v9.2-3 */ +/* however master branch was already bumped to v9.3-1 */ +/* with this file, we are undoing the catalog changes that */ +/* have happened between 9.2-2 to 9.3-1, and making 9.2-4 */ +/* as the release that we can */ + +-- undo the changes for citus_extradata_container that happened on citus 9.3 +DROP FUNCTION IF EXISTS pg_catalog.citus_extradata_container(INTERNAL); +CREATE FUNCTION pg_catalog.citus_extradata_container(INTERNAL) + RETURNS void + LANGUAGE C + AS 'MODULE_PATHNAME', $$citus_extradata_container$$; +COMMENT ON FUNCTION pg_catalog.citus_extradata_container(INTERNAL) + IS 'placeholder function to store additional data in postgres node trees'; + +DROP FUNCTION IF EXISTS pg_catalog.update_distributed_table_colocation(regclass, text); diff --git a/src/test/regress/expected/multi_extension.out b/src/test/regress/expected/multi_extension.out index ee7e09107..502766b4c 100644 --- a/src/test/regress/expected/multi_extension.out +++ b/src/test/regress/expected/multi_extension.out @@ -111,11 +111,21 @@ ALTER EXTENSION citus UPDATE TO '9.0-1'; ALTER EXTENSION citus UPDATE TO '9.0-2'; ALTER EXTENSION citus UPDATE TO '9.1-1'; ALTER EXTENSION citus UPDATE TO '9.2-1'; +ALTER EXTENSION citus UPDATE TO '9.2-2'; +/* + * As we mistakenly bumped schema version to 9.3-1 (in previous + * release), we support updating citus schema from 9.3-1 to 9.2-4, + * but we do not support explicitly updating it to to 9.3-1. + * Hence below update (to 9.3-1) command 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" +ALTER EXTENSION citus UPDATE TO '9.2-4'; -- show running version SHOW citus.version; citus.version --------------------------------------------------------------------- - 9.2.3 + 9.2.4 (1 row) -- ensure no objects were created outside pg_catalog diff --git a/src/test/regress/sql/multi_extension.sql b/src/test/regress/sql/multi_extension.sql index d264247a5..4dc55d512 100644 --- a/src/test/regress/sql/multi_extension.sql +++ b/src/test/regress/sql/multi_extension.sql @@ -112,6 +112,15 @@ ALTER EXTENSION citus UPDATE TO '9.0-1'; ALTER EXTENSION citus UPDATE TO '9.0-2'; ALTER EXTENSION citus UPDATE TO '9.1-1'; ALTER EXTENSION citus UPDATE TO '9.2-1'; +ALTER EXTENSION citus UPDATE TO '9.2-2'; +/* + * As we mistakenly bumped schema version to 9.3-1 (in previous + * release), we support updating citus schema from 9.3-1 to 9.2-4, + * but we do not support explicitly updating it to to 9.3-1. + * Hence below update (to 9.3-1) command should fail. + */ +ALTER EXTENSION citus UPDATE TO '9.3-1'; +ALTER EXTENSION citus UPDATE TO '9.2-4'; -- show running version SHOW citus.version; @@ -334,4 +343,3 @@ DROP DATABASE another; \c - - - :worker_1_port DROP DATABASE another; -