Re: BUG #16565: Systemd service file does not create /var/run/postgresql directory across reboot

From: Marco Cuccato <mcuccato(dot)vts(at)gmail(dot)com>
To: Devrim Gündüz <devrim(at)gunduz(dot)org>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org, PG Bug reporting form <noreply(at)postgresql(dot)org>
Subject: Re: BUG #16565: Systemd service file does not create /var/run/postgresql directory across reboot
Date: 2020-08-13 07:17:39
Message-ID: CACg0f4YBOFQdj=LmqDSwui8Luuy62a=m_i-yUDBqC8B9kPc=9Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Sorry for delay.
I'm using the packages from this Yum repository:
https://download.postgresql.org/pub/repos/yum/12/redhat/rhel-$releasever-$basearch

Il giorno ven 31 lug 2020 alle ore 22:03 Devrim Gündüz <devrim(at)gunduz(dot)org>
ha scritto:

> Hi,
>
> We already create that directory:
>
>
> https://git.postgresql.org/gitweb/?p=pgrpms.git;a=blob;f=rpm/redhat/master/non-common/postgresql-12/master/postgresql-12-tmpfiles.d;h=6c48e34ed1c10c66a651b98acadacb326fb3bacd;hb=HEAD
>
> Are you using community RPMs, or RHEL ones?
>
> Regards, Devrim
>
>
> On 31 July 2020 13:05:14 GMT+03:00, PG Bug reporting form <
> noreply(at)postgresql(dot)org> wrote:
>>
>> The following bug has been logged on the website:
>>
>> Bug reference: 16565
>> Logged by: Marco Cuccato
>> Email address: mcuccato(dot)vts(at)gmail(dot)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
>>
>>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Noah Misch 2020-08-13 07:55:39 Re: BUG #16508: using multi-host connection string when the first host is starting fails
Previous Message Tom Lane 2020-08-13 04:35:52 Re: posgres 12 bug (partitioned table)