From ba77bef2997e98db3a89a3c572189e70b953df67 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Thu, 19 Mar 2015 15:13:44 +0100 Subject: postgresql-setup: keep old-dir usable with pg_upgrade * postgresql-setup.in (upgrade): Don't use --link option if we are not doing in-place upgrade. * NEWS: Document. * configure.ac: Bump minor version. --- NEWS | 7 +++++++ configure.ac | 2 +- postgresql-setup.in | 4 +++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index d2062f4..c519397 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,12 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Bugfixes in 3.1 version + +* The 'pg_upgrade --link' option is not used for non-in-place upgrades + scenarios. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + New in 3.0 version * Use 'pg_upgrade --username' instead of 'pg_upgrade --user' for diff --git a/configure.ac b/configure.ac index a167588..737e26f 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ # Use the MAJ.MIN[~SUFF]. Note that X.X > X.X~SUFF! -AC_INIT([postgresql-setup], [3.0], [praiskup@redhat.com]) +AC_INIT([postgresql-setup], [3.1], [praiskup@redhat.com]) AC_CONFIG_AUX_DIR(auxdir) config_aux_dir=auxdir AC_SUBST([config_aux_dir]) diff --git a/postgresql-setup.in b/postgresql-setup.in index a8a1edc..8b30d71 100644 --- a/postgresql-setup.in +++ b/postgresql-setup.in @@ -253,6 +253,8 @@ upgrade() cleanup=false script_result=1 elif perform_initdb; then + $inplace && link_option=--link + # After creating the empty new-format database, do the upgrade run_cmd_as_dbadmin "\ $scls_upgrade_hacks \ @@ -263,7 +265,7 @@ upgrade() '--new-bindir=$PGENGINE' \ '--old-datadir=$pgdataold' \ '--new-datadir=$pgdata' \ - --link \ + $link_option \ '--old-port=$PGPORT' '--new-port=$PGPORT' \ @PG_UPGRADE_BIN_USER_OPT@=postgres \ $PGSETUP_PGUPGRADE_OPTIONS" \ -- cgit