From: | Gregory D Dennis <gdennis(at)MIT(dot)EDU> |
---|---|
To: | pgsql-cygwin(at)postgresql(dot)org |
Subject: | IpcSemaphoreCreate - detailed account |
Date: | 2003-02-08 13:01:03 |
Message-ID: | 3E44FF8F.8020307@mit.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Seth Rubin | 2003-02-08 16:16:36 | Re: Latest cygwin always crashing with Postgres |
Previous Message | Pablo Pérez | 2003-02-08 00:01:20 | info |