[pmg-devel] [PATCH pmg-api 0/3] make postgresql version a variable

Stoiko Ivanov s.ivanov at proxmox.com
Thu Aug 8 09:13:59 CEST 2019


While testing upgrades to Debian Buster and Postgresql 11 a rewrite of
/etc/postgresql/9.6/main/postgresql.conf with the config file for postgresql 11
led to the database not being able to start anymore.

The reason was that postgresql by default has the major version in the config
file for various directory names (which makes it possible to easily run
multiple versions next to each other). Since the running `pmgmirror` still had
the old config-path it wrote the config for version 11 in the location for 9.6.

Roughly tested by diffing the postgresql config before and after the changes on
a running 9.6 and a running 11 cluster.

Stoiko Ivanov (3):
  move postgres_admin_command into PMG::Utils
  add get_pg_server_version in PMG::Utils
  adapt postgresql.conf template to variable version

 src/PMG/Backup.pm                |  3 ++-
 src/PMG/Config.pm                |  5 +++-
 src/PMG/DBTools.pm               | 18 +-------------
 src/PMG/Utils.pm                 | 40 ++++++++++++++++++++++++++++++++
 src/templates/postgresql.conf.in | 14 +++++------
 5 files changed, 54 insertions(+), 26 deletions(-)

-- 
2.20.1




More information about the pmg-devel mailing list