Source: postgresql-common Version: 181+deb9u1 Severity: normal Dear Maintainer,
When I upgraded a box (that's heavily firewalled, so running reportbug on it doesn't work, so I'm writing this from another box, I'll try to make sure the automatically inserted information reflects the box I had the problem on) from Jessie to Stretch, I also got postgresql 9.6 instead of (or technically in addition to) the 9.4 that was in Jessie, and was told to run pg_upgradecluster to upgrade the databases. That failed with some messages about trying to run "CREATE DATABASE" inside a transaction. After a while and some timme searching the net, I realised that it might be due to me having "\set AUTOCOMMIT off" in /etc/postgresql-common/psqlrc, and adding a -X to every call of psql in pg_upgradecluster did indeed fix the problem and allowed me to upgrade my databases. Most things you'd ever find in a psqlrc is related to interactive use, so just not reading it should be a lot better than the current behaviour. -- System Information: Debian Release: 9.3 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 3.16.0-4-amd64 (SMP w/1 CPU core) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages postgresql-common depends on: ii adduser 3.115 ii debconf [debconf-2.0] 1.5.61 ii init-system-helpers 1.48 ii lsb-base 9.20161125 ii postgresql-client-common 181+deb9u1 ii procps 2:3.3.12-3 ii ssl-cert 1.0.39 ii ucf 3.0036 Versions of packages postgresql-common recommends: ii logrotate 3.11.0-0.1 postgresql-common suggests no packages.