Re: Streaming replication and non-blocking I/O - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Streaming replication and non-blocking I/O
Date
Msg-id 10108.1260758335@sss.pgh.pa.us
Whole thread Raw
In response to Re: Streaming replication and non-blocking I/O  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: Streaming replication and non-blocking I/O  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
Fujii Masao <masao.fujii@gmail.com> writes:
> On Sun, Dec 13, 2009 at 5:42 AM, Heikki Linnakangas
> <heikki.linnakangas@enterprisedb.com> wrote:
>> To implement the timeout in PQgetXLogData(), pqWaitTimed() was changed
>> to take a timeout instead of finishing_time argument. Which is a mistake
>> because it breaks PQconnectdb, and as I said I don't think
>> PQgetXLogData(9 should have a timeout argument to begin with. Instead,
>> it should have a boolean 'async' argument to return immediately if
>> there's no data, and walreceiver main loop should call poll()/select()
>> to wait. Ie. just like PQgetCopyData() works.

> Seems good. I'll revise the code.

Do we need a new "PQgetXLogData" function at all?  Seems like you could
shove the data through the COPY protocol and not have to touch libpq
at all, rather than duplicating a nontrivial amount of code there.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Streaming replication and non-blocking I/O
Next
From: Takahiro Itagaki
Date:
Subject: Re: EXPLAIN BUFFERS