Re: write ahead logging in standby (streaming replication) - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: write ahead logging in standby (streaming replication)
Date
Msg-id 3f0b79eb0911121752n1cf2e44n18452b666a09d55e@mail.gmail.com
Whole thread Raw
In response to Re: write ahead logging in standby (streaming replication)  (Greg Smith <greg@2ndquadrant.com>)
Responses Re: write ahead logging in standby (streaming replication)
Re: write ahead logging in standby (streaming replication)
List pgsql-hackers
On Fri, Nov 13, 2009 at 1:49 AM, Greg Smith <greg@2ndquadrant.com> wrote:
> This a distressingly common thing people get wrong about replication.  You
> can either have synchronous replication, which as you say has to be slow:
> you must wait for an fsync ACK from the secondary and a return trip before
> you can say something is committed on the primary.  Or you can get better
> performance by not waiting for all of those things, but the minute you do
> that it's *not* synchronous replication anymore.  You can't get
> high-performance and true synchronous behavior; you have to pick one.  The
> best you can do if you need both is work on accelerating fsync everywhere
> using the standard battery-backed write cache technique.

I'm not happy that such frequent fsyncs would harm even semi-synchronous
replication (i.e., you must wait for a *recv* ACK from the secondary
and a return
trip before you can say something is committed on the primary. This corresponds
to the DRBD's protocol B) rather than synchronous one. Personally, I think that
semi-synchronous replication is sufficient for HA.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


pgsql-hackers by date:

Previous
From: Itagaki Takahiro
Date:
Subject: Re: New VACUUM FULL
Next
From: Greg Smith
Date:
Subject: Re: Patch committers