Re: initdb/ipc-daemon error

From: Frank Seesink <frank(at)mail(dot)wvnet(dot)edu>
To: pgsql-cygwin(at)postgresql(dot)org
Subject: Re: initdb/ipc-daemon error
Date: 2003-10-01 01:49:56
Message-ID: bldbs6$qu$1@sea.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-cygwin

Kevin Schroeder wrote:
> Well, the problem seems to be worked out. The problem was that I
> was using the ipc-daemon program rather than the ipc-daemon2 program. I
> decided to wipe my CygWin installation and start from scratch and
> realized that even though I installed cygipc the ipc-daemon wouldn't
> run. So I looked at the directory where it should be and there was
> ipc-daemon2.exe. I couldn't get it to run as a service, but if I double
> clicked it from explorer it would keep on running in the background.
> Then I used the cygrunsrv program to set PostgreSQL to run as a service,
> removing the --dep ipc-daemon argument since it was running from
> explorer. I tried starting up PostgreSQL and much to my surprise it
> started.
...

Kevin,

For future reference, always check out Jason's README at

http://www.tishler.net/jason/software/postgresql/postgresql-7.3.4.README

as you might have caught the issue earlier since he lists you need
ipc-daemon2, not ipc-daemon. This change occurred with PostgreSQL
v7.3.4-2 if I remember right, as ipc-daemon2 is now part of cygwin
proper, not an external component. As such, they have made the names
different so users updating their Cygwin installs with setup.exe don't
hose their current setups of older versions of PostgreSQL (since
pre-7.3.4-2 required ipc-daemon, whereas 7.3.4-2 and greater will be
using ipc-daemon2).

Should anyone else find themselves running an older variant of
PostgreSQL and upgrading in a similar manner to 7.3.4-2 or above, the
easiest solution is simply to 'uninstall' the ipc-daemon and postmaster
services, then 'install' ipc-daemon2 and 're-install' postmaster with
its dependency set to the new ipc-daemon2. Note I put these 'install'
words in comments because the files should already be in the Cygwin
tree. What you are doing in essence is simply modifying the Windows
Registry so that ipc-daemon2 and postmaster are treated like NT
services, so you can start/stop/restart them like any other service.

Basically, assuming you followed Jason's README initially,

$ net stop postmaster
$ net stop ipc-daemon
$ ipc-daemon --remove-as-service
$ cygrunsrv --remove postmaster
$ ipc-daemon2 --install-as-service
$ cygrunsrv --install postmaster --path /usr/bin/postmaster --args "-D
/usr/share/postgresql/data -i" --dep ipc-daemon2 --termsig INT --user
postgres --shutdown

Then remove any leftover ipc files:
$ rm /tmp/MultiFile*
$ rm /tmp/cyg*

And finally fire the services back up again:
$ net start ipc-daemon2
$ net start postmaster

This sure beats having to do a clean Cygwin install. Hope this helps
(even though for you, Kevin, it's too late :-) ).

In response to

Browse pgsql-cygwin by date

  From Date Subject
Next Message Chris Faulkner 2003-10-01 09:28:36 compatibility of database files - cygwin to Linux
Previous Message stephan.michael.rupp 2003-09-30 23:56:41 Don't succedd in initializing database