Re: PostgreSQL 7.3.2 running as NT service under Windows XP

From: Frank Seesink <frank(at)mail(dot)wvnet(dot)edu>
To: pgsql-cygwin(at)postgresql(dot)org
Subject: Re: PostgreSQL 7.3.2 running as NT service under Windows XP
Date: 2003-05-29 18:26:03
Message-ID: bb5j82$9dr$1@main.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-cygwin

Jason Tishler wrote:
...
>>[snip]
>>
>>The following is the contents of /var/log/postmaster.log:
>>____________________________________________________________
>>[snip]
>>LOG: smart shutdown request
>>LOG: shutting down
>>LOG: fast shutdown request
>>[snip]
>>____________________________________________________________
>>
>>From the above, it appears that PostgreSQL first receives a "smart
>>shutdown request", followed by a "fast shutdown request". Are we
>>getting closer? :-)
>
>
> Yes! I can reproduce the problem under 2000 too. But, for some reason,
> my database still shuts down cleanly.
>
> Anyway, I tried to solve this in cygrunsrv but I was unsuccessful (which
> is obvious in hindsight). I will work with the Cygwin developers to try
> to solve this in the Cygwin DLL. I will report back when I have status.

Thanks for all your help in this.

...
> I just tried my hack and it worked as advertised:
>
> $ echo (</proc/registry/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/postmaster/Parameters/AppPath)
> /usr/local/bin/postmaster.sh
> $ cat /usr/local/bin/postmaster.sh
> #!/bin/sh
> rm -f /usr/share/postgresql/data/postmaster.pid
> /usr/bin/postmaster $*
>
> $ net start | fgrep postmaster
> postmaster
> $ net start postmaster
> The requested service has already been started.
>
> More help is available by typing NET HELPMSG 2182.

Ahhh, I see now. Sorry, forgot NT/2K/XP will prevent the multiple
instances. Was thinking *nix. My bad. As long as you treat
'postmaster' solely as an NT service and don't try to launch the
executable from the BASH shell, for example (and why would you?), this
will work great. It will fail if someone end-runs the NT service
aspect, but we have to have faith that users have enough sense not to do
that (e.g., after installing/running 'postmaster' as an NT service, they
don't try to follow the manual instructions for firing up PostgreSQL as
listed in the first section of the readme).

Thanks. This script beats my hack by a mile. Much cleaner.

In response to

Responses

Browse pgsql-cygwin by date

  From Date Subject
Next Message Sean McCune 2003-05-30 16:38:05 Re: PostgreSQL 7.3.2 running as NT service under Windows XP
Previous Message Jason Tishler 2003-05-29 15:01:40 Re: PostgreSQL 7.3.2 running as NT service under Windows XP