Re: PSA: Systemd will kill PostgreSQL
От
Craig Ringer
Тема
Re: PSA: Systemd will kill PostgreSQL
Дата
Msg-id
CAMsr+YHhKA9+rzo=c0shEP_XatB=6uSEqMyjLbAeZAK=CjGqTA@mail.gmail.com
Ответ на
PSA: Systemd will kill PostgreSQL (Joshua D. Drake)
Список
Дерево обсуждения
PSA: Systemd will kill PostgreSQL "Joshua D. Drake" <linuxhiker@gmail.com>
Re: PSA: Systemd will kill PostgreSQL Craig Ringer <craig@2ndquadrant.com>
Re: PSA: Systemd will kill PostgreSQL Bernd Helmle <mailings@oopsware.de>
Re: PSA: Systemd will kill PostgreSQL Craig Ringer <craig@2ndquadrant.com>
Re: PSA: Systemd will kill PostgreSQL Julien Rouhaud <julien.rouhaud@dalibo.com>
On 11 July 2016 at 01:56, Joshua D. Drake <linuxhiker@gmail.com> wrote:
Hackers,
This just came across my twitter feed:
https://lists.freedesktop.org/archives/systemd-devel/2014-April/018373.html
tl;dr; Systemd 212 defaults to remove all IPC (including SYSV memory) when a user "fully" logs out.
The underlying change sounds like a fix, not a problem. It ensures that when a user logs out, various dangling processes are cleaned up. Given the amount of work PostgreSQL has to do to try to make sure it's really gone, having systemd be able to just clobber everything is pretty nice. So long as there's control over it.
However, it will break existing deployments that use "non-system" users to run PostgreSQL. I had a look and didn't find any useful definition of what systemd considers a "system user". Perhaps by uid threshold in login.defs? But then what happens for people who're managing users via a directory, who need to avoid conflicting with host-local UIDs, but also need some of those users to have systemd "system user" like behaviour?
It's also not clear if there's any API apps can use to exempt themselves from this, or any wrapper command to spawn processes that aren't clobbered. With appropriate user privileges to permit it, at least.
I've asked for clarification on the bug, so I'd better don my fire-proof suit.
В списке pgsql-hackers по дате отправления
От: Craig Ringer
Дата: