From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Jason Tishler <jason(at)tishler(dot)net> |
Cc: | pgsql-cygwin(at)postgresql(dot)org, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: ipc-daemon |
Date: | 2002-11-04 19:25:00 |
Message-ID: | Pine.LNX.4.44.0211042014280.1395-100000@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-cygwin pgsql-hackers |
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(at)gmx(dot)net
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-11-04 19:43:01 | Re: [HACKERS] ipc-daemon |
Previous Message | Peter Eisentraut | 2002-11-04 19:24:27 | Re: Problem configuring Postgres under Cygwin |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2002-11-04 19:27:51 | Re: Is my Internet connection slow |
Previous Message | Pedro M. Ferreira | 2002-11-04 18:51:42 | Re: Float output formatting options |