[Pkg-postgresql-public] Bug#876293: postgresql-common: pg_upgradecluster needs to copy wal_level earlier

Magnus Hagander magnus at hagander.net
Wed Sep 20 15:01:21 UTC 2017


Package: postgresql-common
Version: 184.pgdg90+1
Severity: important

For the link based method to upgrade standby servers, wal_level needs to be set
to replica *before* pg_upgrade is run on the cluster (but after initdb).
pg_upgradecluster currenlty copies the settings file over *after* the pg_upgrade
command has finished.

I think the best way to deal with this is to have pg_upgradecluster specifically
copy the setting for wal_level between the call to initdb and the call to
pg_upgrade. Another way could be to include it in the call to pg_createcluster.

Putting a small script in /etc/postgresql-common/pg_upgradecluster.d to run at
the init step to edit the configfile and replace the wal_level parameter fixes
the probem, so doing it at the same place as the init step is a working position.
However, it should of course not be needed to put a script in for such basic
functionality.

Finally, I believe that this requirement should only affect PostgreSQL <10, since
the defualt wal_level has changed there. I hvae not verified this part of the
claim.


-- System Information:
Debian Release: 9.1
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-updates')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US: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  184.pgdg90+1
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

Versions of packages postgresql-common suggests:
ii  libjson-perl  2.90-1

-- debconf information excluded



More information about the Pkg-postgresql-public mailing list