Skip to content

Commit

Permalink
Downgrade from 9.3-1 to 9.2-4 AND upgrade from 9.2-2 to 9.2-4 (#3673)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
onderkalaci authored Mar 31, 2020
1 parent 5c6df97 commit e63435d
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 27 deletions.
35 changes: 12 additions & 23 deletions configure
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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=''

Expand Down Expand Up @@ -664,7 +664,6 @@ infodir
docdir
oldincludedir
includedir
runstatedir
localstatedir
sharedstatedir
sysconfdir
Expand Down Expand Up @@ -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}'
Expand Down Expand Up @@ -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=* \
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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]...
Expand Down Expand Up @@ -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]
Expand All @@ -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]
Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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 $@
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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\\"
Expand Down
2 changes: 1 addition & 1 deletion configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/backend/distributed/citus.control
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions src/backend/distributed/sql/citus--9.2-2--9.2-4.sql
Original file line number Diff line number Diff line change
@@ -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 */
18 changes: 18 additions & 0 deletions src/backend/distributed/sql/citus--9.3-1--9.2-4.sql
Original file line number Diff line number Diff line change
@@ -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);
12 changes: 11 additions & 1 deletion src/test/regress/expected/multi_extension.out
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 9 additions & 1 deletion src/test/regress/sql/multi_extension.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -334,4 +343,3 @@ DROP DATABASE another;

\c - - - :worker_1_port
DROP DATABASE another;

0 comments on commit e63435d

Please sign in to comment.