So, here we have a testsystem that we do also use for some regular mails (how should we test it otherwise ).
it was created as PMG 5.x, then in-place-upgraded to 6.0, afterwards to 6.1.
(following https://pmg.proxmox.com/wiki/index.php/Upgrade_from_5.x_to_6.0#In-place_Upgrade of course)
today we saw a quite strange event: after its regular "sig hup" at 7:00AM the only thing reported by the pmgpolicy in mail.log is the database maintenance and its hourly "sig hup".
after a reboot the process reported something new: pmgpolicy[345]: ERROR: unable to load database
and afterwards: "pmgpolicy[348]: Can't call method "ping" on an undefined value at /usr/bin/pmgpolicy line 514." (which is strange in itself as there should be errorhandling to report a database-connection error)
so what happened - we do not exactly know when but the postgresql upgrade to v11 somehow was reverted by PMG as "/etc/pmg/templates/postgresql.conf.in" still points the data_directory = '/var/lib/postgresql/9.6/main' -> obviously the wrong path and postgresql also complains about this during reboot.
now the big question would be - can we change the template somehow?
for the moment the /etc/postgresql/postgresql.conf is manually updated to reflect the new path to "/var/lib/postgresql/11/main"
after starting postresql this way things seem to go back to normal, except for this after the next regular "sig hup":
pmgpolicy[337]: ERROR: Can't call method "close" on unblessed reference at /usr/bin/pmgpolicy line 399.
so maybe the in-place "upgrade postgres database" could be more elaborated as we believed "pg_dropcluster --stop 11 main" and "pg_upgradecluster -v 11 9.6 main" would be the way to go, but it seems this is not everything that needs to be done.
thx
hk
it was created as PMG 5.x, then in-place-upgraded to 6.0, afterwards to 6.1.
(following https://pmg.proxmox.com/wiki/index.php/Upgrade_from_5.x_to_6.0#In-place_Upgrade of course)
today we saw a quite strange event: after its regular "sig hup" at 7:00AM the only thing reported by the pmgpolicy in mail.log is the database maintenance and its hourly "sig hup".
after a reboot the process reported something new: pmgpolicy[345]: ERROR: unable to load database
and afterwards: "pmgpolicy[348]: Can't call method "ping" on an undefined value at /usr/bin/pmgpolicy line 514." (which is strange in itself as there should be errorhandling to report a database-connection error)
so what happened - we do not exactly know when but the postgresql upgrade to v11 somehow was reverted by PMG as "/etc/pmg/templates/postgresql.conf.in" still points the data_directory = '/var/lib/postgresql/9.6/main' -> obviously the wrong path and postgresql also complains about this during reboot.
now the big question would be - can we change the template somehow?
for the moment the /etc/postgresql/postgresql.conf is manually updated to reflect the new path to "/var/lib/postgresql/11/main"
after starting postresql this way things seem to go back to normal, except for this after the next regular "sig hup":
pmgpolicy[337]: ERROR: Can't call method "close" on unblessed reference at /usr/bin/pmgpolicy line 399.
so maybe the in-place "upgrade postgres database" could be more elaborated as we believed "pg_dropcluster --stop 11 main" and "pg_upgradecluster -v 11 9.6 main" would be the way to go, but it seems this is not everything that needs to be done.
thx
hk