From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: mcuccato.vts@gmail.com
Subject: BUG #16565: Systemd service file does not create /var/run/postgresql directory across reboot
Date: Fri, 31 Jul 2020 10:05:14 +0000
Message-ID: <16565-3ce4cfab67915389@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 16565
Logged by: Marco Cuccato
Email address: mcuccato.vts@gmail.com
PostgreSQL version: 12.3
Operating system: Red Hat Enterprise Linux Server release 7.6
Description:
When the server is rebooted, PostgreSQL service doesn't start because of
this error:
FATAL: could not create lock file "/var/run/postgresql/.s.PGSQL.5432.lock":
No such file or directory
This happens because it tries to create the lock file under
/var/run/postgresql that doesn't exists. It doesn't exist because /var/run
is a symlink to ../run (/run as absolute path) that is mounted as tmpfs.
As tmpfs is not persistent, when the server is rebooted the directory
doesn't exists and must be re-created.
Doing that, the lock file will be created successfully and the service will
start up correctly.
Please fix the postgresql-12.service systemd file: make it check and
eventually create /var/run/postgresql directory.
Thanks
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, mcuccato.vts@gmail.com
Subject: Re: BUG #16565: Systemd service file does not create /var/run/postgresql directory across reboot
In-Reply-To: <16565-3ce4cfab67915389@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox