Re: [HACKERS] shared memory based stat collector (was: Sharing recordtypmods between backends)

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [HACKERS] shared memory based stat collector (was: Sharing recordtypmods between backends)
Дата
Msg-id CA+TgmoYiAQXiHceU0aShw3z=qf-_g0x-ZQb-Ocz72T78zDfa3A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] shared memory based stat collector (was: Sharingrecord typmods between backends)  (Andres Freund <andres@anarazel.de>)
Ответы Re: [HACKERS] shared memory based stat collector (was: Sharing record typmods between backends)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, Aug 14, 2017 at 12:36 PM, Andres Freund <andres@anarazel.de> wrote:
>> If so, why isn't choose_dsm_implementation() trying it; and if not,
>> why are we carrying it?
>
> I think the idea was that there might be platforms that require it, but
> ...

Right.  So, for example, POSIX shared memory will fail on Linux is
/dev/shm is inaccessible, and I've seen such systems in the wild.
System V shared memory will fail if the kernel limits are too small.
On *BSD, which lacks POSIX shared memory altogether, whether you can
start PostgreSQL with the default configuration settings is depends
entirely on how the System V shared memory limits are configured.

I think it would be a bad idea to remove both
dynamic_shared_memory_type=none and dynamic_shared_memory_type=mmap.
If you do that, then somebody who doesn't have root and whose system
configuration is messed up can't start PostgreSQL at all.  While I
understand that catering to rarely-used options has some cost, I don't
think those costs are exorbitant.  And, I think history shows that
minimizing dependencies on operating-system settings is a win.  Commit
b0fc0df9364d2d2d17c0162cf3b8b59f6cb09f67 may not be my
most-appreciated commit ever, but it undoubtedly had the highest
appreciation-to-effort ratio.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: [HACKERS] shared memory based stat collector (was: Sharing recordtypmods between backends)
Следующее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] shared memory based stat collector (was: Sharingrecord typmods between backends)