Re: Back-patch use of unnamed POSIX semaphores for Linux?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Back-patch use of unnamed POSIX semaphores for Linux?
Дата
Msg-id 27282.1481141564@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Back-patch use of unnamed POSIX semaphores for Linux?  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Back-patch use of unnamed POSIX semaphores for Linux?  (Robert Haas <robertmhaas@gmail.com>)
Re: Back-patch use of unnamed POSIX semaphores for Linux?  (Alex Hunsaker <badalex@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, Dec 6, 2016 at 11:54 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Robert Haas <robertmhaas@gmail.com> writes:
>>> On Tue, Dec 6, 2016 at 9:53 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>>> I think we should give serious consideration to back-patching commit
>>>> ecb0d20a9, which changed the default semaphore type to unnamed-POSIX
>>>> on Linux.

>>> Urk.  That sounds like a scary thing to back-patch.

>> I don't deny that it's scary, but the alternative seems to be to be
>> rather badly broken on systemd-using distros for years to come.
>> That's pretty scary too.

> Why can't this be configurable?

It already is.  Note that I said "default".

As things stand, it's only a configure-time choice, but I've been
thinking that we might be well advised to make it run-time configurable.
I do not believe that anyone's still using a Linux version wherein
POSIX semas wouldn't work, but I am not convinced that the same is true
for FreeBSD.  And a configure-run-time test is not a pleasant option
because it doesn't work for cross-compiles.  So really, on platforms
where we think POSIX semas might work, it'd be best to try a sem_init()
during postmaster start and then fall back to SysV if it doesn't work.

But this is all kind of moot if Peter is right that systemd will zap
POSIX shmem along with SysV semaphores.  I've been trying to reproduce
the issue on a Fedora 25 installation, and so far I can't get it to
zap anything, so I'm a bit at a loss how to prove things one way or
the other.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: pg_dump vs. TRANSFORMs
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Implement table partitioning.