Обсуждение: BUG #13959: Missing tmpfile exclude conf for socket

Поиск
Список
Период
Сортировка

BUG #13959: Missing tmpfile exclude conf for socket

От
jsosic@gmail.com
Дата:
The following bug has been logged on the website:

Bug reference:      13959
Logged by:          Jakov Sosic
Email address:      jsosic@gmail.com
PostgreSQL version: 9.4.1
Operating system:   CentOS 7
Description:

Systemd on EL7 and probably some Debian based distributions has service
called systemd-tmpfiles-clean. That service deletes everything from /tmp
that's not excluded via special files.

PgSQL stores socket under /tmp by default, and systemd-tmpfiles-clean can
actually delete it. To avoid this, PGSQL packages should bring a file which
excludes it's socket from being deleted by tmpfiles-clean.

This is an example of file:

cat >> /usr/lib/tmpfiles.d/postgresql.conf <<EOF
# systemd tmpfiles exclude file for pgsql
# pgsql software unfortunately stores some important files
# in /tmp which should not be deleted

# Exclude pgsql socket and lock files
x /tmp/.s.PGSQL.*
EOF

Re: BUG #13959: Missing tmpfile exclude conf for socket

От
Devrim Gündüz
Дата:
Hi,<br /><br /> Community RPMs already provide this:<br /><br /><a
href="http://git.postgresql.org/gitweb/?p=pgrpms.git;a=tree;f=rpm/redhat/9.4/postgresql/EL-7;h=7f86e648aef233c660b95c14dc97bc914c76cf81;hb=HEAD">http://git.postgresql.org/gitweb/?p=pgrpms.git;a=tree;f=rpm/redhat/9.4/postgresql/EL-7;h=7f86e648aef233c660b95c14dc97bc914c76cf81;hb=HEAD</a><br
/><br/> ...and also ve store the socket also under /var/run/postgresql directory.<br /><br /> Which RPMs are you
using?<br/><br /> Regards, Devrim<br /><br /><div class="gmail_quote">On February 14, 2016 12:53:37 AM GMT+02:00,
jsosic@gmail.comwrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204,
204,204); padding-left: 1ex;"><pre class="k9mail">The following bug has been logged on the website:<br /><br />Bug
reference:     13959<br />Logged by:          Jakov Sosic<br />Email address:      jsosic@gmail.com<br />PostgreSQL
version:9.4.1<br />Operating system:   CentOS 7<br />Description:        <br /><br />Systemd on EL7 and probably some
Debianbased distributions has service<br />called systemd-tmpfiles-clean. That service deletes everything from /tmp<br
/>that'snot excluded via special files.<br /><br />PgSQL stores socket under /tmp by default, and
systemd-tmpfiles-cleancan<br />actually delete it. To avoid this, PGSQL packages should bring a file which<br
/>excludesit's socket from being deleted by tmpfiles-clean.<br /><br />This is an example of file:<br /><br />cat
>>/usr/lib/tmpfiles.d/postgresql.conf <<EOF<br /># systemd tmpfiles exclude file for pgsql<br /># pgsql
softwareunfortunately stores some important files<br /># in /tmp which should not be deleted<br /><br /># Exclude 
pgsql socket and lock files<br />x /tmp/.s.PGSQL.*<br />EOF<br /><br /></pre></blockquote></div><br /> -- <br /> Sent
frommy Android device with K-9 Mail. Please excuse my brevity. 

Re: BUG #13959: Missing tmpfile exclude conf for socket

От
Jakov Sosic
Дата:
On 02/15/2016 06:19 PM, Devrim Gündüz wrote:
> Hi,
>
> Community RPMs already provide this:
>
>
http://git.postgresql.org/gitweb/?p=pgrpms.git;a=tree;f=rpm/redhat/9.4/postgresql/EL-7;h=7f86e648aef233c660b95c14dc97bc914c76cf81;hb=HEAD
>
> ...and also ve store the socket also under /var/run/postgresql directory.
>
> Which RPMs are you using?
>

I was on 9.4.1...

Looking at the SPEC file in the link you provided it seems you guys
fixed this bug in 9.4.2:


```
Source19: postgresql.tmpfiles.d`
```

```
* Fri May 22 2015 Devrim Gündüz <devrim@gunduz.org> - 9.4.2-2PGDG
  - Create and own /var/run/postgresql directory. Per report from
    Pete Deffendol.
```


So I guess you can ditch the bug report...

Sorry for spam :(