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

walreceiver is uninterruptible on win32

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: walreceiver is uninterruptible on win32
Date: 2010-03-10 09:09:57
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
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.


Fujii Masao
NTT Open Source Software Center

Attachment: win32_interruptible_walreceiver_v1.patch
Description: text/x-patch (10.3 KB)


pgsql-hackers by date

Next:From: Kevin FlanaganDate: 2010-03-10 09:28:40
Subject: Re: Access violation from palloc, Visual Studio 2005, C-language function
Previous:From: Pavel StehuleDate: 2010-03-10 07:39:00
Subject: Re: patch (for 9.1) string functions

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