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

Fabian Grünbichler f.gruenbichler at proxmox.com
Fri Aug 9 08:54:54 CEST 2019


applied whole series, thanks

On August 8, 2019 3:36 pm, Stoiko Ivanov wrote:
> 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.
> 
> Changes from v1:
> * changed the start and end tags in the postgresql template, in order not to
>   escape '[%' - Thanks for the suggestion @Fabian
> * changed the major version matching according to feedback from Dominik and
>   Fabian - Thanks
> * removed the export of get_pg_server_version
> * fixed a syntax-error in the first commit (using qw, and having ',' before
>   the closing bracket)
> 
> 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                 | 50 ++++++++++++++++++++++++++++++++
>  src/templates/postgresql.conf.in | 13 +++++----
>  5 files changed, 64 insertions(+), 25 deletions(-)
> 
> -- 
> 2.20.1
> 
> 
> _______________________________________________
> pmg-devel mailing list
> pmg-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel
> 
> 



More information about the pmg-devel mailing list