[ClusterLabs] PAF / pgSQL fails after OS/system shutdown - FIX

Jehan-Guillaume de Rorthais jgdr at dalibo.com
Mon Nov 13 07:25:14 EST 2023


On Fri, 10 Nov 2023 20:34:40 +0100
lejeczek via Users <users at clusterlabs.org> wrote:

> On 10/11/2023 18:16, Jehan-Guillaume de Rorthais wrote:
> > On Fri, 10 Nov 2023 17:17:41 +0100
> > lejeczek via Users <users at clusterlabs.org> wrote:
> >
> > ...  
> >>> Of course you can use "pg_stat_tmp", just make sure the temp folder
> >>> exists:
> >>>
> >>>     cat <<EOF > /etc/tmpfiles.d/postgresql-part.conf
> >>>     # Directory for PostgreSQL temp stat files
> >>>     d /var/run/postgresql/14-paf.pg_stat_tmp 0700 postgres postgres - -
> >>>     EOF
> >>>
> >>> To take this file in consideration immediately without rebooting the
> >>> server, run the following command:
> >>>
> >>>     systemd-tmpfiles --create /etc/tmpfiles.d/postgresql-part.conf  
> >> Then there must be something else at play here with Ubuntus,
> >> for none of the nodes has any extra/additional configs for
> >> those paths & I'm sure that those were not created manually.  
> > Indeed.
> >
> > This parameter is usually set by pg_createcluster command and the folder
> > created by both pg_createcluster and pg_ctlcluster commands when needed.
> >
> > This is explained in PAF tutorial there:
> >
> > https://clusterlabs.github.io/PAF/Quick_Start-Debian-10-pcs.html#postgresql-and-cluster-stack-installation
> >
> > These commands comes from the postgresql-common wrapper, used in all Debian
> > related distros, allowing to install, create and use multiple PostgreSQL
> > versions on the same server.
> >  
> >> Perhpaphs pgSQL created these on it's own outside of HA-cluster.  
> > No, the Debian packaging did.
> >
> > Just create the config file I pointed you in my previous answer,
> > systemd-tmpfiles will take care of it and you'll be fine.
> >  
> [...]
> Still that directive for the stats - I wonder if that got 
> introduced, injected somewhere in between because the PG 
> cluster - which I had for a while - did not experience this 
> "issue" from the start and not until "recently"

No, it's a really old behavior of the debian wrapper. 

I documented it for PAF on Debian 8 and 9 in 2017-2018, but it has been there
for 9.5 years:

  https://salsa.debian.org/postgresql/postgresql-common/-/commit/e83bbefd0d7e87890eee8235476c403fcea50fa8

Regards,


More information about the Users mailing list