Re: SIGTERM does not stop backend postgres processes immediately

Поиск
Список
Период
Сортировка
От Jason Tishler
Тема Re: SIGTERM does not stop backend postgres processes immediately
Дата
Msg-id 20010515101036.D321@dothill.com
обсуждение исходный текст
Ответ на SIGTERM does not stop backend postgres processes immediately  (Fred Yankowski <fred@ontosys.com>)
Ответы Re: SIGTERM does not stop backend postgres processes immediately  (Fred Yankowski <fred@ontosys.com>)
Список pgsql-cygwin
Corrina,

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

--
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.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

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

Предыдущее
От: "Heinrich Retzlaw"
Дата:
Сообщение: include-files and libaries for postgreSQL/Win2000??
Следующее
От: Jason Tishler
Дата:
Сообщение: Re: Re: SIGTERM does not stop backend postgres processes immediately