On Fri, Jan 13, 2012 at 12:27 PM, Fujii Masao <masao.fujii@gmail.com> wrote:
>> In my patch, the reason I avoided doing WRITE mode (which we had
>> previously referred to as RECV) was that no fsync of the WAL contents
>> takes place. In that case we are applying changes using un-fsynced WAL
>> data and in case of crash this would cause a problem.
>
> My patch has not changed the execution order of WAL flush and replay.
> WAL records are always replayed after they are flushed by walreceiver.
> So, such a problem doesn't happen.
> But which means that transaction might need to wait for WAL flush caused
> by previous transaction even if WRITE mode is chosen. Which limits the
> performance gain by WRITE mode, and should be improved later, I think.
If the WALreceiver still flushes that is OK.
The latency would be smoother and lower if the WALwriter were active.
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services