Re: ipc-daemon

Поиск
Список
Период
Сортировка
Искать
От
Peter Eisentraut
Тема
Re: ipc-daemon
Дата
Msg-id
Pine.LNX.4.44.0211042014280.1395-100000@localhost.localdomain
Ответ на
Re: ipc-daemon (Jason Tishler)
Список
Дерево обсуждения
ipc-daemon Peter Eisentraut <peter_e@gmx.net>
Re: ipc-daemon Jason Tishler <jason@tishler.net>
Re: ipc-daemon Jason Tishler <jason@tishler.net>
Re: ipc-daemon Peter Eisentraut <peter_e@gmx.net>
Re: [HACKERS] ipc-daemon Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] ipc-daemon Jason Tishler <jason@tishler.net>
Re: [HACKERS] ipc-daemon Jason Tishler <jason@tishler.net>
Re: [HACKERS] ipc-daemon Bruce Momjian <pgman@candle.pha.pa.us>
Re: [HACKERS] ipc-daemon Richard Pais <chris_pais@yahoo.com>
Re: [HACKERS] ipc-daemon Bruce Momjian <pgman@candle.pha.pa.us>
Re: [HACKERS] ipc-daemon Jason Tishler <jason@tishler.net>
Re: [HACKERS] ipc-daemon Bruce Momjian <pgman@candle.pha.pa.us>
Re: [HACKERS] ipc-daemon Jason Tishler <jason@tishler.net>
Re: [HACKERS] ipc-daemon Bruce Momjian <pgman@candle.pha.pa.us>
Re: [HACKERS] ipc-daemon Peter Eisentraut <peter_e@gmx.net>
Re: [HACKERS] ipc-daemon Tom Lane <tgl@sss.pgh.pa.us>
Jason Tishler writes:

>     1. If ipc-daemon is not running, then cygipc's shmget() will return
>        EACCES.
>     2. This causes PostgreSQL's InternalIpcMemoryCreate() to return
>        NULL.
>     3. This causes PostgreSQL's PGSharedMemoryCreate() to spin looking
>        for accessible shared memory which it will never find.

To me, this is a bug in PostgreSQL.  A comment in
InternalIpcMemoryCreate() says

         * Fail quietly if error indicates a collision with existing
         * segment. One would expect EEXIST, given that we said IPC_EXCL,
         * but perhaps we could get a permission violation instead?

I tend to think that the answer to that question is No.

> After reading the shmget() man page, I choose to return ENOSPC.  Is
> there a better choice?  Such as ENOMEM?

My first thought was ENOSYS (system call not implemented -- what BSD
kernels tend to return if you didn't compile them with SysV IPC support),
but that isn't a clearly superior choice either.  Fixing PostgreSQL is
probably better and quicker to yield a return.

-- 
Peter Eisentraut   peter_e@gmx.net

В списке pgsql-cygwin по дате отправления
От: Peter Eisentraut
Дата:
От: Jason Tishler
Дата:
FAQ