Re: Problem starting ipc-daemon2 -
06-23-2004
, 06:05 PM
Well, it took me the better part of two days, but I figured it out,
and here is what I learned:
History:
********
We used to install/run Postgres < (less than) version 7.4.2 under
Cygwin as follows:
(NOTE: THIS NO LONGER WORKS, it is history)
1. Start the cygipc ipc-daemon2: $ ipc-daemon2 &
2. Initialize PostgreSQL: $ initdb
-D/usr/share/postgresql/data
3. Start the PostgreSQL postmaster: $ postmaster -D
/usr/share/postgresql/data &
4. Connect to PostgreSQL: $ psql template1
We now do the following for
PostScript version >= (greater/equal) version 7.4.2-1
************************************************** ***
- Read Jason Tishlers message "Updated Cygwin Package:
postgresql-7.4.2-1"
at
http://cygwin.com/ml/cygwin/2004-06/msg00457.html
- This basically tells us to upgrade to PostgreSQL 7.4.2, and with
this to run Postgres against cygserver instead of cygipc
- Read
How to use the Cygserver services
and
How to use the Cygserver services
in
http://www.cygwin.com/cygwin-ug-net/...cygserver.html
- This basically tells you that you need to initialize cygserver by
running
/usr/bin/cygserver-config
(I believe this installs "Cygwin cygserver" as a Microsoft XP service
and sets it for automatic startup on reboot; (when started, two
processes cygrunsrv.exe and cygserver.exe will appear in the XP Task
Manager)
- You need to set the environment variable
CYGWIN=server
BEFORE initializing Postgres with
initdb -D /usr/share/postgresql/data
Environment variables:
**********************
As far as I can tell from
http://www.cygwin.com/cygwin-ug-net/setup-env.html
environment variables in Cygwin are set in an XP (DOS) shell, or via
the XP Start Button->Settings->Control
Panel->System->Advanced->Environment Variables (probably as a System
Variable rather than a User variable, which former would
be good for all users).
In other words, you set the environment variable CYGWIN before
starting cygwin
Glitches / Errors
*****************
For some anoying reason often when starting up Postmaster (the
Postgres server) with
$ /usr/bin/pg_ctl -D /usr/share/postgresql/data -l postgreslog start
I get an error
pg_ctl: Another postmaster may be running. Trying to start postmaster
anyway.
980: Signal 12
pg_ctl: cannot start postmaster
Examine the log output.
I fix this by removing the lock file
$ rm /usr/share/postgresql/data/postmaster.pid
- If you had previously installed ipc-daemon2 (or ipc-daemon) as an XP
service, it may still be in the services list. Check
under
XP (DOS) shell, or via the XP Start Button->Settings->Control
Panel->Services under something like
"Cygwin IPC Daemon 2"
You can remove it under Cygwin with
$ ipc-daemon2 --remove-as-service
(Also chkeck the XP Task Manager that ipc it isn't still running, and
if so, stop it.)
Thanks,
Wolfgang.
Santa Barbara
Keywords:
Postgres Cygwin, error signal 12, cygserver, cygrunsrv, ipc-daemon,
ipc-daemon2, psql hangs |