pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #16565: Systemd service file does not create /var/run/postgresql directory across reboot
4+ messages / 3 participants
[nested] [flat]

* BUG #16565: Systemd service file does not create /var/run/postgresql directory across reboot
@ 2020-07-31 10:05  PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 2 replies; 4+ messages in thread

From: PG Bug reporting form @ 2020-07-31 10:05 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: mcuccato.vts@gmail.com

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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #16565: Systemd service file does not create /var/run/postgresql directory across reboot
@ 2020-07-31 13:03  Marco Cuccato <mcuccato.vts@gmail.com>
  parent: PG Bug reporting form <noreply@postgresql.org>
  1 sibling, 0 replies; 4+ messages in thread

From: Marco Cuccato @ 2020-07-31 13:03 UTC (permalink / raw)
  To: mcuccato.vts@gmail.com; pgsql-bugs@lists.postgresql.org

Fixed by myself creating a /etc/systemd/system/postgresql-12.service with
this content:

.include /usr/lib/systemd/system/postgresql-12.service
[Service]
RuntimeDirectory=postgresql

The  RuntimeDirectory directive should be included in original
/usr/lib/systemd/system/postgresql-12.service file.

Il giorno ven 31 lug 2020 alle ore 15:01 PG Bug reporting form <
noreply@postgresql.org> ha scritto:

> 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
>
>

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #16565: Systemd service file does not create /var/run/postgresql directory across reboot
@ 2020-07-31 20:03  Devrim Gündüz <devrim@gunduz.org>
  parent: PG Bug reporting form <noreply@postgresql.org>
  1 sibling, 1 reply; 4+ messages in thread

From: Devrim Gündüz @ 2020-07-31 20:03 UTC (permalink / raw)
  To: mcuccato.vts@gmail.com,pgsql-bugs@lists.postgresql.org,PG Bug reporting form <noreply@postgresql.org>

Hi,

We already create that directory:

https://git.postgresql.org/gitweb/?p=pgrpms.git;a=blob;f=rpm/redhat/master/non-common/postgresql-12/...

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@postgresql.org> wrote:
>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

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #16565: Systemd service file does not create /var/run/postgresql directory across reboot
@ 2020-08-13 07:17  Marco Cuccato <mcuccato.vts@gmail.com>
  parent: Devrim Gündüz <devrim@gunduz.org>
  0 siblings, 0 replies; 4+ messages in thread

From: Marco Cuccato @ 2020-08-13 07:17 UTC (permalink / raw)
  To: Devrim Gündüz <devrim@gunduz.org>; +Cc: pgsql-bugs@lists.postgresql.org, PG Bug reporting form <noreply@postgresql.org>

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@gunduz.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/...
>
> 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@postgresql.org> wrote:
>>
>> 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
>>
>>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2020-08-13 07:17 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-07-31 10:05 BUG #16565: Systemd service file does not create /var/run/postgresql directory across reboot PG Bug reporting form <noreply@postgresql.org>
2020-07-31 13:03 ` Marco Cuccato <mcuccato.vts@gmail.com>
2020-07-31 20:03 ` Devrim Gündüz <devrim@gunduz.org>
2020-08-13 07:17   ` Marco Cuccato <mcuccato.vts@gmail.com>

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