IpcSemaphoreCreate - detailed account - Mailing list pgsql-cygwin

From Gregory D Dennis
Subject IpcSemaphoreCreate - detailed account
Date
Msg-id 3E44FF8F.8020307@mit.edu
Whole thread Raw
Responses Re: IpcSemaphoreCreate - detailed account  (Jason Tishler <jason@tishler.net>)
List pgsql-cygwin
I am still receiving an 'IpcSemaphoreCreate' error when I try to
initialize the database as the 'postgres' user. I installed cygipc-1.13
successfully as a service and I can initialize the db fine under my own
username and run postmaster as a non-service. But I'd like to get the
service installation working. I am running on Windows XP. Here's a
detailed log of my attempts to follow the provided installation
instructions:

-------------------------
The given command

    ipc-daemon --install-as-service

did not work so i used instead

    cygrunsrv --install ipc-daemon --desc "CygWin IPC Daemon" --path
/usr/local/bin/ipc-daemon --termsig INT --shutdown

i then started the ipc daemon

    net start ipc-daemon

and i can verify from the services window that it is in fact running.
I created the postgres user with

    net user postgres <password> /add /fullname:postgres
/comment:'PostgreSQL user account' /homedir:"$(cygpath -w
/home/postgres)"

Where <password> was my chosen password and followed that with

    mkpasswd -l -u postgres >>/etc/passwd

I granted the "postgres" user the "Log on as a service" user right:

    cmd /c secpol.msc

This command opened the "Local Security Settings" Window. I clicked
"Local Policies"->"User Rights Assignment"-->"Log on as a service".
Clicked to add a user or group. Enter the name "postgres" and then the
"Check Names" button. This replaced the 'postgres' name with
'<ComputerName>/postgres'. I clicked OK and closed the "Local Security
Settings" window.

I installed postmaster as a service:

   cygrunsrv --install postmaster --desc "PostgreSQL Database Server"
--path /usr/bin/postmaster --args "-D /usr/share/postgresql/data -i"
--dep ipc-daemon --termsig INT --user postgres --shutdown --stdout
/pgsql.log --stderr /pgsql.err

I then clicked "Start"->"Log Off"->"Switch User"->"postgres". Opened
up a cygwin shell and created the data directory

    mkdir /usr/share/postgresql/data

and ensured the postgres user owned that directory

    chown postgres /usr/share/postgresql/data

still logged on as 'postgres', i tried to initialize the database

    initdb -D /usr/share/postgresql/data

and i received the following error:

    The files belonging to this database system will be owned by user
"postgres".
    This user must also own the server process.

    The database cluster will be initialized with locale C.

    Fixing permissions on existing directory
/usr/share/postgresql/data... ok
    creating directory /usr/share/postgresql/data/base... ok
    creating directory /usr/share/postgresql/data/global... ok
    creating directory /usr/share/postgresql/data/pg_xlog... ok
    creating directory /usr/share/postgresql/data/pg_clog... ok
    creating template1 database in /usr/share/postgresql/data/base/1...
IpcSemaphoreCreate: semget(key=1, num=17, 03600) failed: Function not
implemented

    initdb failed.
-------------------------

Any help?

Thanks, Greg


pgsql-cygwin by date:

Previous
From: Jason Tishler
Date:
Subject: Re: Installing PostgreSQL 7.3.1 on windows 2000
Next
From: Seth Rubin
Date:
Subject: Re: Latest cygwin always crashing with Postgres