On Fri, Jun 6, 2014 at 8:05 PM,  <furu...@pm.nttdata.co.jp> wrote:
>> -----Original Message-----
>> > > Flush is not performed every time write, it is performed
>> > > collectively like walrecever.
>> >
>> > I only glanced at this, but afaics you're only flushing at the end
>> > every WAL segment. That will result in absolutely horrible performance,
>> right?
>> > Walreceiver does flush more frequently than that. It basically syncs
>> > every chunk of received WAL...
>> IMO the completion of the write loop was completion of received WAL.
>> And Walreceiver same.
>> I confirm it about the flush position.
> As you say,Walreceiver does flush more frequently than that.

No. IIUC walreceiver does flush *less* frequently than what you implemented
on pg_receivexlog. Your version of pg_receivexlog tries to do flush every time
when it receives one WAL chunk. OTOH, walreceiver does flush only when
there is no extra WAL chunk in receive buffer. IOW, after writing WAL chunk,
if there is another WAL chunk that walreceiver can receive immediately, it
postpones flush later.

> However, it seems difficult to apply as same way.

Why? ISTM that's not so difficult.


Fujii Masao

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to