Re: PSA: Systemd will kill PostgreSQL

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

Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> 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 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 wanted to go there if
it meant that we could have silent loss of SysV shmem with no other
symptoms, because as I said upthread, I'm concerned about that breaking
the multiple-postmaster interlock. However, if the cleanup kills only
semaphores and not attached-to shmem, then that objection goes away and
this becomes something we should seriously consider.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-08-16 17:13:06 Re: [GENERAL] C++ port of Postgres
Previous Message Alvaro Herrera 2016-08-16 17:00:24 Re: Assertion failure in REL9_5_STABLE