Re: Feature: POSIX Shared memory support

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: Feature: POSIX Shared memory support
Дата
Msg-id
9480.1170775034@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
Feature: POSIX Shared memory support Chris Marcellino <maps@levelview.com>
Re: Feature: POSIX Shared memory support Tom Lane <tgl@sss.pgh.pa.us>
Re: Feature: POSIX Shared memory support Michael Paesold <mpaesold@gmx.at>
Re: Feature: POSIX Shared memory support Chris Marcellino <maps@levelview.com>
Re: Feature: POSIX Shared memory support Alvaro Herrera <alvherre@commandprompt.com>
Re: Feature: POSIX Shared memory support Chris Marcellino <maps@levelview.com>
Re: Feature: POSIX Shared memory support Tom Lane <tgl@sss.pgh.pa.us>
Re: Feature: POSIX Shared memory support "Andrew Dunstan" <andrew@dunslane.net>
Re: Feature: POSIX Shared memory support Alvaro Herrera <alvherre@commandprompt.com>
Re: Feature: POSIX Shared memory support Andrew Dunstan <andrew@dunslane.net>
Re: Feature: POSIX Shared memory support Alvaro Herrera <alvherre@commandprompt.com>
Chris Marcellino  writes:
> To this end, I have "ported" the svsv_shmem.c layer to use the POSIX  
> calls (which are some ways more robust w.r.t reducing collision by  
> using strings as shared memory id's, instead of ints).

This has been suggested before, and rejected before, on the grounds that
the POSIX API provides no way to detect whether anyone else is attached
to the segment.  Not being able to tell that is a tremendous robustness
hit for us.  We are not going to risk destroying someone's database
(or in the alternative, failing to restart after most crashes, which
it looks like your patch would do) in order to make installation
fractionally easier.

I read through your patch in the hopes that you had a solution for this,
but all I find is a copied-and-pasted comment

> 	/*
> 	 * We detect whether a shared memory segment is in use by seeing whether
> 	 * it (a) exists and (b) has any processes are attached to it.
> 	 */

followed by code that does no such thing.

			regards, tom lane
В списке pgsql-patches по дате отправления
От: Chris Marcellino
Дата:
От: Michael Paesold
Дата:
FAQ