With the default install it is obviously systemd managed.
There the config defaults to:
$ grep stats_temp /etc/postgresql/10/main/postgresql.conf
stats_temp_directory = '/var/run/postgresql/10-main.pg_stat_tmp'
and later the same with version bumped
$ grep stats_temp /etc/postgresql/11/main/postgresql.conf
stats_temp_directory = '/var/run/postgresql/11-main.pg_stat_tmp'
Adn as identified before each cluster is started through pg_ctlcluster as part of a templated service at /lib/systemd/system/postgresql@.service.
See /usr/share/doc/postgresql-common/README.systemd for more.
The above was mostly for myself to context switch in what was said on this bug before.
@Dmitrii - with "systemd is not used to manage postgres lifetime" you meant the heartbeat setup discussed here right? Or are there other cases affected? Because then the fix in resource would obviously not help that much - yet OTOH it is meant to be used through systemd, not sure how much of a pgsql bug it would be then.
@Dmitrii - Finally if you would convert "easily reproducible when systemd is not used to manage postgres lifetime" into a small set of commands I'd appreciate that (maybe you have that already around?).
P.S. to be ahead I also have added MPs for the (rather trivial) change to be reviewable.
With the default install it is obviously systemd managed. /10/main/ postgresql. conf temp_directory = '/var/run/ postgresql/ 10-main. pg_stat_ tmp' /11/main/ postgresql. conf temp_directory = '/var/run/ postgresql/ 11-main. pg_stat_ tmp'
There the config defaults to:
$ grep stats_temp /etc/postgresql
stats_
and later the same with version bumped
$ grep stats_temp /etc/postgresql
stats_
Adn as identified before each cluster is started through pg_ctlcluster as part of a templated service at /lib/systemd/ system/ postgresql@ .service. doc/postgresql- common/ README. systemd for more.
See /usr/share/
The above was mostly for myself to context switch in what was said on this bug before.
@Dmitrii - with "systemd is not used to manage postgres lifetime" you meant the heartbeat setup discussed here right? Or are there other cases affected? Because then the fix in resource would obviously not help that much - yet OTOH it is meant to be used through systemd, not sure how much of a pgsql bug it would be then.
@Dmitrii - Since I don't know when/if Mario will respond I created you a PPA (Bionic+Xenial) to try. Feel free to test that and let me know if that would help your case. /launchpad. net/~paelzer/ +archive/ ubuntu/ bug-1749283- resource- agent-to- start-pgsql
=> https:/
@Dmitrii - Finally if you would convert "easily reproducible when systemd is not used to manage postgres lifetime" into a small set of commands I'd appreciate that (maybe you have that already around?).
P.S. to be ahead I also have added MPs for the (rather trivial) change to be reviewable.