Package: postgresql-9.6 Version: 9.6~rc1-1 Severity: important I just upgraded my postgresql 9.5 to 9.6, but the upgrade didn't go too well. I'll paste below first the aptitude part, then the debconf prompt I got finally my attempt at upgrading the main cluster. The debconf prompt should be familiar, but I'm including it as that is what I think should be improved.
============== aptitude upgrade part ======================================= Setting up postgresql-9.6 (9.6~rc1-1) ... Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. Creating new cluster 9.6/main ... config /etc/postgresql/9.6/main data /var/lib/postgresql/9.6/main locale C.UTF-8 socket /var/run/postgresql port 5433 ============== debconf prompt ======================================= Obsolete major version 9.5 The PostgreSQL version 9.5 is obsolete, but the server or client packages are still installed. Please install the latest packages (postgresql-9.6 and postgresql-client-9.6) and upgrade the existing clusters with pg_upgradecluster (see manpage). Please be aware that the installation of postgresql-9.6 will automatically create a default cluster 9.6/main. If you want to upgrade the 9.5/main cluster, you need to remove the already existing 9.6 cluster (pg_dropcluster --stop 9.6 main, see manpage for details). The old server and client packages are no longer supported. After the existing clusters are upgraded, the postgresql-9.5 and postgresql-client-9.5 packages should be removed. Please see /usr/share/doc/postgresql-common/README.Debian.gz for details. ============== trying to upgrade cluster ============================= root@bagend:/home/diederik# pg_upgradecluster 9.5 main Error: target cluster 9.6/main already exists root@bagend:/home/diederik# pg_dropcluster --stop 9.6 main Redirecting stop request to systemctl root@bagend:/home/diederik# pg_upgradecluster 9.5 main Stopping old cluster... Notice: extra pg_ctl/postgres options given, bypassing systemctl for stop operation pg_ctl: server does not shut down HINT: The "-m fast" option immediately disconnects sessions rather than waiting for session-initiated disconnection. Error: Could not stop old cluster root@bagend:/home/diederik# pg_upgradecluster 9.5 main psql: FATAL: the database system is shutting down psql: FATAL: the database system is shutting down Use of uninitialized value $out in pattern match (m//) at /usr/share/perl5/PgCommon.pm line 925. psql: FATAL: the database system is shutting down Use of uninitialized value $out in pattern match (m//) at /usr/share/perl5/PgCommon.pm line 931. Use of uninitialized value $ctype in scalar chomp at /usr/share/perl5/PgCommon.pm line 934. Use of uninitialized value $collate in scalar chomp at /usr/share/perl5/PgCommon.pm line 935. Error: could not get cluster locales ===================================================================== The impression I got from the debconf prompt was to do 'pg_upgradecluster 9.5 main' first, but as you can see that didn't work. Minor issue afaic, but it would make more sense to reverse the sequence in the debconf prompt so that the 9.6 main cluster is dropped before the upgrade is initiated. But the 'pg_upgradecluster 9.5 main' failed here and waiting a while with the expectation that the database server may needed more time to shut down didn't help. Thanks to #postgresql on freenode it turned out that the solution was actually rather simple, but it would make sense to include that in the debconf prompt as well as it (apparently) isn't clear to everyone. $ akonadictl stop After I did that, the 'pg_upgradecluster 9.5 main' did complete succesfully. So a mention that all clients should be stopped before the upgrade would prevent others (I hope) of stumbling onto the same issue as I did. In retrospect the 'HINT' may have pointed to that, but me as not a seasoned postgresql user/admin didn't make the connection. (akonadi is the DB backend for KMail primarily) Set the severity to important as it would've put my db in a non-working state. I'll leave it up to you to make it RC which would have the benefit of being triggered/listed by apt-listbugs. Cheers, Diederik -- System Information: Debian Release: stretch/sid APT prefers unstable-debug APT policy: (500, 'unstable-debug'), (500, 'unstable'), (500, 'testing'), (101, 'experimental'), (1, 'experimental-debug') Architecture: amd64 (x86_64) Foreign Architectures: i386, armhf Kernel: Linux 4.7.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages postgresql-9.6 depends on: ii libc6 2.24-3 ii libgssapi-krb5-2 1.14.3+dfsg-2 ii libldap-2.4-2 2.4.42+dfsg-2+b2 ii libpam0g 1.1.8-3.3 ii libpq5 9.6~rc1-1 ii libssl1.0.2 1.0.2i-1 ii libsystemd0 231-7 ii libxml2 2.9.4+dfsg1-2 ii locales 2.24-3 ii postgresql-client-9.6 9.6~rc1-1 ii postgresql-common 176 ii ssl-cert 1.0.38 ii tzdata 2016g-1 Versions of packages postgresql-9.6 recommends: ii postgresql-contrib-9.6 9.6~rc1-1 ii sysstat 11.3.5-1 Versions of packages postgresql-9.6 suggests: pn locales-all <none> -- no debconf information