Re: PostgreSQL 7.3.2 running as NT service under Windows XP

Поиск
Список
Период
Сортировка
От Jason Tishler
Тема Re: PostgreSQL 7.3.2 running as NT service under Windows XP
Дата
Msg-id 20030529150139.GA724@tishler.net
обсуждение исходный текст
Ответ на Re: PostgreSQL 7.3.2 running as NT service under Windows XP  (Frank Seesink <frank@mail.wvnet.edu>)
Ответы Re: PostgreSQL 7.3.2 running as NT service under Windows XP  (Frank Seesink <frank@mail.wvnet.edu>)
Re: PostgreSQL 7.3.2 running as NT service under Windows XP  (Jason Tishler <jason@tishler.net>)
Список pgsql-cygwin
Frank,

On Wed, May 28, 2003 at 06:26:59PM -0400, Frank Seesink wrote:
> Jason Tishler wrote:
> >I'm concerned that the Cygwin DLL is actually sending a SIGTERM to
> >the postmaster even though cygrunsrv is going to send a SIGINT too.
> >Does the postmaster log indicate a "smart shutdown" or "fast
> >shutdown" when the pid file is not deleted?
>
> I did the following:
>
> [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.

> >I would call the above "quick and dirty".  I wasn't clear but I
> >assumed the following:
> >
> >    1. It would only be invoked via net start which will prevent
> >       multiple instances.
>
> Actually, I understand what you mean, but technically, no this is not
> true.  If I do a 'net start postmaster' from the command line when a
> copy is already running, this script will delete postmaster.pid and
> fire up a 2nd copy.

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.

Jason

--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

В списке pgsql-cygwin по дате отправления:

Предыдущее
От: Frank Seesink
Дата:
Сообщение: Re: PostgreSQL 7.3.2 running as NT service under Windows XP
Следующее
От: Frank Seesink
Дата:
Сообщение: Re: PostgreSQL 7.3.2 running as NT service under Windows XP