Re: [HACKERS] PSA: Systemd will kill PostgreSQL

2016-10-21 Thread Robert Haas
On Fri, Oct 21, 2016 at 8:29 AM, Peter Eisentraut wrote: > On 8/16/16 1:05 PM, Tom Lane wrote: >> Oh, interesting. It had occurred to me that we might be able to dodge >> this issue if we started to recommend using unnamed POSIX semaphores >> instead of SysV. (Obviously we'd want to check perfor

Re: [HACKERS] PSA: Systemd will kill PostgreSQL

2016-10-21 Thread Peter Eisentraut
On 8/16/16 1:05 PM, Tom Lane wrote: > Oh, interesting. It had occurred to me that we might be able to dodge > this issue if we started to recommend using unnamed POSIX semaphores > instead of SysV. (Obviously we'd want to check performance, but it's > at least a plausible alternative.) I had not

Re: [HACKERS] PSA: Systemd will kill PostgreSQL

2016-08-16 Thread Tom Lane
Peter Eisentraut writes: > A brief look through the code and some reading between the lines of the > documentation shows that it only cleans up shared memory segments that > are no longer attached to, but there is no such check for semaphores. Oh, interesting. It had occurred to me that we might

Re: [HACKERS] PSA: Systemd will kill PostgreSQL

2016-08-16 Thread Peter Eisentraut
On 8/16/16 11:24 AM, Tom Lane wrote: > Not sure I believe that --- the cases that have been reported to us > involved postgres processes that were still alive but had had their > SysV semaphore sets deleted out from under them. Likely the SysV > shmem segments too, but that wouldn't cause any obse

Re: [HACKERS] PSA: Systemd will kill PostgreSQL

2016-08-16 Thread Magnus Hagander
On Tue, Aug 16, 2016 at 5:24 PM, Tom Lane wrote: > Magnus Hagander writes: > > On Aug 16, 2016 5:11 PM, "Tom Lane" wrote: > >> Dunno, it was still working the last time I used Fedora for anything > much. > >> Admittedly, that was about three years ago. But the issue would still > >> arise if y

Re: [HACKERS] PSA: Systemd will kill PostgreSQL

2016-08-16 Thread Tom Lane
Magnus Hagander writes: > On Aug 16, 2016 5:11 PM, "Tom Lane" wrote: >> Dunno, it was still working the last time I used Fedora for anything much. >> Admittedly, that was about three years ago. But the issue would still >> arise if you prefer "pg_ctl start". > There are two independent changes

Re: [HACKERS] PSA: Systemd will kill PostgreSQL

2016-08-16 Thread Magnus Hagander
On Aug 16, 2016 5:11 PM, "Tom Lane" wrote: > > Magnus Hagander writes: > > On Aug 16, 2016 4:43 PM, "Tom Lane" wrote: > >> Rather, the problem arises when J. Ordinary User does > >> nohup postmaster & > >> and then logs out. > > > I think this is a partially different issue though. They already

Re: [HACKERS] PSA: Systemd will kill PostgreSQL

2016-08-16 Thread Tom Lane
Magnus Hagander writes: > On Aug 16, 2016 4:43 PM, "Tom Lane" wrote: >> Rather, the problem arises when J. Ordinary User does >> nohup postmaster & >> and then logs out. > I think this is a partially different issue though. They already broke the > nohup approach earlier with a different change,

Re: [HACKERS] PSA: Systemd will kill PostgreSQL

2016-08-16 Thread Magnus Hagander
On Aug 16, 2016 4:43 PM, "Tom Lane" wrote: > > Peter Eisentraut writes: > > On 8/16/16 8:53 AM, Greg Stark wrote: > >> That's a system level change though. How would a normal user manage this? > > > Arguably, if you are a normal user, you probably shouldn't be using > > systemd to start system se

Re: [HACKERS] PSA: Systemd will kill PostgreSQL

2016-08-16 Thread Tom Lane
Peter Eisentraut writes: > On 8/16/16 8:53 AM, Greg Stark wrote: >> That's a system level change though. How would a normal user manage this? > Arguably, if you are a normal user, you probably shouldn't be using > systemd to start system services under your own account. I'm not totally sure, but

Re: [HACKERS] PSA: Systemd will kill PostgreSQL

2016-08-16 Thread Peter Eisentraut
On 8/16/16 8:53 AM, Greg Stark wrote: > That's a system level change though. How would a normal user manage this? Arguably, if you are a normal user, you probably shouldn't be using systemd to start system services under your own account. -- Peter Eisentraut http://www.2ndQuadrant.c

Re: [HACKERS] PSA: Systemd will kill PostgreSQL

2016-08-16 Thread Greg Stark
On Tue, Aug 16, 2016 at 12:41 AM, Josh Berkus wrote: > Presumably people just need to add the system account tag to the unit > file, no? That's a system level change though. How would a normal user manage this? -- greg -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To

Re: [HACKERS] PSA: Systemd will kill PostgreSQL

2016-08-16 Thread Craig Ringer
On 16 August 2016 at 08:33, Tom Lane wrote: > Josh Berkus writes: > > On 08/15/2016 05:18 PM, Tom Lane wrote: > >> Well, yeah, it's easy to fix once you know you need to do so. The > >> complaint is basically that out-of-the-box, it's broken, and it's > >> not very clear what was gained by brea

Re: [HACKERS] PSA: Systemd will kill PostgreSQL

2016-08-15 Thread Tom Lane
Josh Berkus writes: > On 08/15/2016 05:18 PM, Tom Lane wrote: >> Well, yeah, it's easy to fix once you know you need to do so. The >> complaint is basically that out-of-the-box, it's broken, and it's >> not very clear what was gained by breaking it. > You're welcome to argue with Lennart about t

Re: [HACKERS] PSA: Systemd will kill PostgreSQL

2016-08-15 Thread Josh Berkus
On 08/15/2016 05:18 PM, Tom Lane wrote: > Josh Berkus writes: >> On 08/15/2016 02:43 PM, Tom Lane wrote: >>> Last I heard, there's an exclusion for "system" accounts, so an >>> installation that's using the Fedora-provided pgsql account isn't >>> going to have a problem. It's homebrew installs ru

Re: [HACKERS] PSA: Systemd will kill PostgreSQL

2016-08-15 Thread Tom Lane
Josh Berkus writes: > On 08/15/2016 02:43 PM, Tom Lane wrote: >> Last I heard, there's an exclusion for "system" accounts, so an >> installation that's using the Fedora-provided pgsql account isn't >> going to have a problem. It's homebrew installs running under >> ordinary-user accounts that are

Re: [HACKERS] PSA: Systemd will kill PostgreSQL

2016-08-15 Thread Josh Berkus
On 08/15/2016 02:43 PM, Tom Lane wrote: > Josh Berkus writes: >> On 07/10/2016 10:56 AM, Joshua D. Drake wrote: >>> tl;dr; Systemd 212 defaults to remove all IPC (including SYSV memory) >>> when a user "fully" logs out. > >> That looks like it was under discussion in April, though. Do we have >>

Re: [HACKERS] PSA: Systemd will kill PostgreSQL

2016-08-15 Thread Tom Lane
Josh Berkus writes: > On 07/10/2016 10:56 AM, Joshua D. Drake wrote: >> tl;dr; Systemd 212 defaults to remove all IPC (including SYSV memory) >> when a user "fully" logs out. > That looks like it was under discussion in April, though. Do we have > confirmation it was never fixed? I'm not seeing

Re: [HACKERS] PSA: Systemd will kill PostgreSQL

2016-08-15 Thread Josh Berkus
On 07/10/2016 10:56 AM, Joshua D. Drake 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. That loo

Re: [HACKERS] PSA: Systemd will kill PostgreSQL

2016-07-11 Thread Craig Ringer
On 11 July 2016 at 17:49, Bernd Helmle wrote: > > > --On 11. Juli 2016 13:25:51 +0800 Craig Ringer > wrote: > > > Perhaps by uid threshold in login.defs? > > systemd's configure.ac has this: > > AC_ARG_WITH(system-uid-max, > AS_HELP_STRING([--with-system-uid-max=UID] > [M

Re: [HACKERS] PSA: Systemd will kill PostgreSQL

2016-07-11 Thread Bernd Helmle
--On 11. Juli 2016 13:25:51 +0800 Craig Ringer wrote: > Perhaps by uid threshold in login.defs? systemd's configure.ac has this: AC_ARG_WITH(system-uid-max, AS_HELP_STRING([--with-system-uid-max=UID] [Maximum UID for system users]), [SYSTEM_UID_MAX="$withval"],

Re: [HACKERS] PSA: Systemd will kill PostgreSQL

2016-07-10 Thread Craig Ringer
On 11 July 2016 at 01:56, Joshua D. Drake 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

Re: [HACKERS] PSA: Systemd will kill PostgreSQL

2016-07-10 Thread Julien Rouhaud
On 10/07/2016 19:56, Joshua D. Drake 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. > AFAIK it

[HACKERS] PSA: Systemd will kill PostgreSQL

2016-07-10 Thread Joshua D. Drake
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. JD -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresq