Re: walreceiver is uninterruptible on win32 - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: walreceiver is uninterruptible on win32
Date
Msg-id 3f0b79eb1003150356k7d7cc10at6472bc29ad15c71a@mail.gmail.com
Whole thread Raw
In response to Re: walreceiver is uninterruptible on win32  (Magnus Hagander <magnus@hagander.net>)
Responses Re: walreceiver is uninterruptible on win32
List pgsql-hackers
On Mon, Mar 15, 2010 at 6:42 PM, Magnus Hagander <magnus@hagander.net> wrote:
>>> Perhaps we can factor out most of this
>>> into functions in backend/port/win32 so that we can re-use it fro
>>> there?
>>
>> Sorry. I couldn't get your point. Could you explain it in detail?
>
> What I'm referring to is the part that Heikki writes as "The
> implementation should be shared between the two, but I'm not sure
> how". I think we should try to factor out things that can be shared
> into separate functions and stick those in port/win32 (assuming
> they're win32-specific, otherwise, in another suitable location), and
> then call them from both. There seems to be a lot of things that
> should be doable that way.
>
> I notice for example that the dblink patch doesn't have the code for
> timeout handling - shouldn't it?
>
> I think we need to look at this as a single problem needing to be
> solved, and then have the same solution applied to dblink and
> walreceiver.

Thanks for the explanation. I agree that the code should be shared,
but am not sure how, too.

Something like libpq_select() which waits for the socket to become
ready would be required for walreceiver and dblink. But it's necessary
for walreceiver on not only win32 but also the other, so some functions
might need to be placed in the location other than port/win32.

I'll think of this issue for a while.

Regards,

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


pgsql-hackers by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: Getting to beta1
Next
From: Greg Smith
Date:
Subject: Re: Getting to beta1