From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | Greg Smith <greg(at)2ndquadrant(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: write ahead logging in standby (streaming replication) |
Date: | 2009-11-13 01:52:34 |
Message-ID: | 3f0b79eb0911121752n1cf2e44n18452b666a09d55e@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Nov 13, 2009 at 1:49 AM, Greg Smith <greg(at)2ndquadrant(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Smith | 2009-11-13 01:55:55 | Re: Patch committers |
Previous Message | Itagaki Takahiro | 2009-11-13 01:47:15 | Re: New VACUUM FULL |