walreceiver is uninterruptible on win32 - Mailing list pgsql-hackers

From Fujii Masao
Subject walreceiver is uninterruptible on win32
Date
Msg-id 3f0b79eb1003100109u4e5131c1hc26c1db709ab3418@mail.gmail.com
Whole thread Raw
Responses Re: walreceiver is uninterruptible on win32
List pgsql-hackers
Hi,

http://archives.postgresql.org/pgsql-hackers/2010-01/msg01672.php
On win32, the blocking libpq functions like PQconnectdb() and
PQexec() are uninterruptible since they use the vanilla select()
instead of our signal emulation layer compatible select().
Nevertheless, currently walreceiver uses them to establish a
connection, send a handshake message and wait for the reply.
So walreceiver also becomes uninterruptible for a while. This
is the must-fix problem for 9.0.

I replaced the blocking libpq functions currently used with
asynchronous ones, and used the emulated version of select()
to wait, to make walreceiver interruptible. Here is the patch.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Attachment

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: patch (for 9.1) string functions
Next
From: "Kevin Flanagan"
Date:
Subject: Re: Access violation from palloc, Visual Studio 2005, C-language function