Re: PSA: Systemd will kill PostgreSQL

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Josh Berkus <josh(at)agliodbs(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Greg Stark <stark(at)mit(dot)edu>
Subject: Re: PSA: Systemd will kill PostgreSQL
Date: 2016-08-16 15:48:41
Message-ID: CABUevEyKaejwxdOsxbvgsbFLT-izRcCbBcT_3pDzcM3JFhHLcQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 16, 2016 at 5:24 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Magnus Hagander <magnus(at)hagander(dot)net> writes:
> > On Aug 16, 2016 5:11 PM, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> 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 AFAIK. One is that whenever a user that
> > logged in interactively logs out all their processes are killed,
> regardless
> > of nohup. The other one is the one about shared memory mentioned here.
> They
> > will both independently kill postgres sessions launched manually. Or with
> > pg_ctl.
>
> 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 observable effects
> for the running cluster. (It *would* risk breaking the interlock
> against starting a new postmaster, I fear.)
>
> It might be that both behaviors exist now but more people know about
> how to turn off the killing-processes one.
>
>
Yes, I think it's the second. See for example
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=825394. You can configure
KillUserProcesses=no in logind.conf to get rid of it (that bug discusses
the debian default behaviour).

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2016-08-16 15:52:39 Re: [GENERAL] C++ port of Postgres
Previous Message Joy Arulraj 2016-08-16 15:45:04 Re: C++ port of Postgres