Skip site navigation (1) Skip section navigation (2)

Re: SIGTERM does not stop backend postgres processes immediately

From: Jason Tishler <Jason(dot)Tishler(at)dothill(dot)com>
To: cygwin(at)cygwin(dot)com
Cc: Pgsql-Cygwin <pgsql-cygwin(at)postgresql(dot)org>
Subject: Re: SIGTERM does not stop backend postgres processes immediately
Date: 2001-05-15 14:10:36
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-cygwin

On Tue, May 15, 2001 at 11:20:54AM +0200, Corinna Vinschen wrote:
> On Fri, May 11, 2001 at 09:09:28AM +1000, Robert Collins wrote:
> > Blueskying a concept here: what about cygwin opening all sockets in
> > non-blocking mode, and if the app thinks that it is a blocking call wait
> > on the socket && on a signal event?
> > 
> > Obviously not trivial to get working right, but
> > a) would it work on 95?
> > b) thoughts?
> b) I have just applied a patch to Cygwin which uses overlapped IO
>    together with the Winsock2 calls WSARecv, WSARecvFrom, WSASend
>    and WSASendTo if available. The new mechanism is interruptable
>    by signals. If Winsock2 is not available the new implementation
>    just falls back to using the non-inerruptable Winsock1 calls.
>    I would like to ask people to test it especially in conjunction
>    with PostgreSQL, which I haven't set up.

I just tried my Cygwin PostgreSQL 7.1.1 distribution against the latest
Cygwin CVS and the above mentioned patch solves the postmaster shutdown
problem.  Now Cygwin PostgreSQL behaves identical to UNIX PostgreSQL
with regard to shutdown:

1. pg_ctl stop (i.e., kill -s SIGTERM) causes postmaster to wait for
all clients to disconnect before shutting down.

2. pg_ctl -m fast stop (i.e., kill -s SIGINT) causes postmaster to
shutdown immediately (but cleanly) without waiting for all clients
to disconnect.

Your patch fixed case 2 above and I believe this is the last piece needed
by Fred Yankowski to complete his PostgreSQL NT service patch.

Thank you very much for this patch -- it is really appreciated.


Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason(dot)Tishler(at)dothill(dot)com
Hazlet, NJ 07730 USA                 WWW:


pgsql-cygwin by date

Next:From: Jason TishlerDate: 2001-05-15 14:35:03
Subject: Re: Re: SIGTERM does not stop backend postgres processes immediately
Previous:From: Heinrich RetzlawDate: 2001-05-15 13:24:20
Subject: include-files and libaries for postgreSQL/Win2000??

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group