Re: walreceiver is uninterruptible on win32

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: walreceiver is uninterruptible on win32
Date: 2010-03-15 10:56:10
Message-ID: 3f0b79eb1003150356k7d7cc10at6472bc29ad15c71a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 15, 2010 at 6:42 PM, Magnus Hagander <magnus(at)hagander(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2010-03-15 12:22:38 Re: Getting to beta1
Previous Message Dimitri Fontaine 2010-03-15 09:51:38 Re: Getting to beta1