Package: postgresql-common Version: 210 Severity: important Hi,
I've just tried upgrading postgresql from version 11 to version 12, following the instructions in README.Debian. (Incidentally, the example of upgrading from version 9.6 no longer works, as the minor version should no longer be specified on recent versions.) Here's what happens to me: ******** erdos:~ # pg_dropcluster 12 main --stop erdos:~ # pg_upgradecluster 11 main Restarting old cluster with restricted connections... Notice: extra pg_ctl/postgres options given, bypassing systemctl for start operation Creating new PostgreSQL cluster 12/main ... /usr/lib/postgresql/12/bin/initdb -D /var/lib/postgresql/12/main --auth-local peer --auth-host md5 --encoding UTF8 --lc-collate en_GB.UTF-8 --lc-ctype en_GB.UTF-8 The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale "en_GB.UTF-8". The default text search configuration will be set to "english". Data page checksums are disabled. fixing permissions on existing directory /var/lib/postgresql/12/main ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... posix selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default time zone ... Europe/London creating configuration files ... ok running bootstrap script ... ok performing post-bootstrap initialization ... ok syncing data to disk ... ok Success. You can now start the database server using: pg_ctlcluster 12 main start Ver Cluster Port Status Owner Data directory Log file 12 main 5433 down postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log Starting new cluster... Notice: extra pg_ctl/postgres options given, bypassing systemctl for start operation Error: /usr/lib/postgresql/12/bin/pg_ctl /usr/lib/postgresql/12/bin/pg_ctl start -D /var/lib/postgresql/12/main -l /var/log/postgresql/postgresql-12-main.log -s -o -c config_file="/etc/postgresql/12/main/postgresql.conf" -c hba_file=/tmp/pg_hba._zoYwU.conf exited with status 1: 2019-12-18 08:55:15.323 GMT [520011] FATAL: could not load server certificate file "/etc/ssl/certs/ssl-cert-snakeoil.pem": ee key too small 2019-12-18 08:55:15.323 GMT [520011] LOG: database system is shut down pg_ctl: could not start server Examine the log output. Error: Could not start target cluster erdos:~ # ******** At this point, the postgres process needs to be manually killed. I'm not sure at which point the check on ee key size was introduced, but the default settings of switching ssl on and using the snake oil certificate no longer works. If I modify /etc/postgresql-common/createcluster.conf to say ssl = off, then the upgrade part works smoothly. It would be very helpful, though, for the instruction: Success. You can now start the database server using: pg_ctlcluster 12 main start to appear at the end of the output, rather than buried in the middle of it. Anyway, following this upgrade, "pg_ctlcluster 12 main start" successfully starts the postgresql service. However, /etc/init.d/postgresql start fails: for some reason, there is no longer a postgresql@12-main.service file for systemd. I can't figure out where this file should have been created, but it hasn't been :/. Best wishes, Julian -- System Information: Debian Release: bullseye/sid APT prefers stretch APT policy: (500, 'stretch'), (500, 'testing'), (500, 'stable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.3.0-2-amd64 (SMP w/4 CPU cores) Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8) (ignored: LC_ALL set to en_GB.UTF-8), LANGUAGE=en_GB.utf8 (charmap=UTF-8) (ignored: LC_ALL set to en_GB.UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages postgresql-common depends on: ii adduser 3.118 ii debconf [debconf-2.0] 1.5.73 ii lsb-base 11.1.0 ii perl 5.30.0-9 ii postgresql-client-common 210 ii procps 2:3.3.15-2+b1 ii ssl-cert 1.0.39 ii ucf 3.0038+nmu1 Versions of packages postgresql-common recommends: ii e2fsprogs 1.45.4-1 ii logrotate 3.15.1-2 Versions of packages postgresql-common suggests: ii libjson-perl 4.02000-1 -- Configuration Files: /etc/postgresql-common/createcluster.conf changed: ssl = on cluster_name = '%v/%c' stats_temp_directory = '/var/run/postgresql/%v-%c.pg_stat_tmp' log_line_prefix = '%%m [%%p] %%q%%u@%%d ' add_include_dir = 'conf.d' include_dir '/etc/postgresql-common/createcluster.d' -- debconf information: postgresql-common/ssl: true * postgresql-common/obsolete-major: postgresql-common/catversion-bump: