This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: postgres 7.3 IpcSemaphoreCreate: semget(key=1, num=17,03600)failed: Function not implemented


On Mon, Dec 09, 2002 at 07:34:59PM +0100, Dan Holmsand wrote:
> Jason Tishler wrote:
> >On Mon, Dec 09, 2002 at 12:05:16AM +0100, Dan Holmsand wrote:
> >>I get a similar error:
> >>
> >>IpcSemaphoreInitialize: semctl(id=2, 0, SETVAL, 0) failed: Invalid argument
> >
> >The above is noted in the README:
> >
> >    2. It is recommended to delete all cygipc temporary files
> >    (/tmp/cygipc* and /tmp/MultiFile*) before starting postmaster
> >    under a different user account.  Otherwise, postmaster will fail
> >    to start due to IPC errors.
> I know. However, this doesn't necessarily help if ipc-daemon is run by
> one account (say, "system" or "administrator") and postmaster by
> another (say, "postgres").

IMO, the above is not applicable.  I routinely run ipc-daemon under
system (as a service) or myself (i.e., jt) and postmaster under
postgres.  The issue in my README pertains to starting postmaster under
different user accounts.

In my experience, it is the /tmp/cygipc_* files that cause the problem
not the /tmp/MultiFile* files:

    $ ls -l /tmp/cygipc_*
    -rw-------    1 jt       None      1441792 Dec 10 09:56 /tmp/cygipc_0

This is to be expected due to the write-only by owner permissions above.

> In my experience at least, postgres must have read AND write rights to
> the /tmp/MultiFile* files, otherwise you get the above error on
> startup.

On the other hand, I can switch back and forth between running ipc-daemon
as system and any other user because ipc-daemon creates /tmp/MultiFile*
with write by everyone permissions:

    $ ls -l /tmp/MultiFile* 
    -rw-rw-rw-    1 SYSTEM   SYSTEM    3916520 Dec 10 09:56 /tmp/MultiFileMsg
    -rw-rw-rw-    1 SYSTEM   SYSTEM      22032 Dec 10 09:56 /tmp/MultiFileSem
    -rw-rw-rw-    1 SYSTEM   SYSTEM     202768 Dec 10 09:56 /tmp/MultiFileShm

BTW, are you running ipc-daemon with --tight-security?  Maybe this
explains the difference between what we are observing?


PGP/GPG Key: or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]