Re: New replication mode: write - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: New replication mode: write
Date
Msg-id CA+U5nMKX=j4CHDC0a=etvEAc=CGp-FcjTyM7ABp_-1m7EM=S1w@mail.gmail.com
Whole thread Raw
In response to Re: New replication mode: write  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: New replication mode: write
Next
From: Greg Smith
Date:
Subject: Re: pgbench post-connection command