Re: [HACKERS] Quorum commit for multiple synchronous replication. - Mailing list pgsql-hackers

From Kyotaro HORIGUCHI
Subject Re: [HACKERS] Quorum commit for multiple synchronous replication.
Date
Msg-id 20170419.173901.16598616.horiguchi.kyotaro@lab.ntt.co.jp
Whole thread Raw
In response to Re: [HACKERS] Quorum commit for multiple synchronous replication.  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: [HACKERS] Quorum commit for multiple synchronous replication.  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
List pgsql-hackers
At Wed, 19 Apr 2017 03:03:38 +0900, Fujii Masao <masao.fujii@gmail.com> wrote in
<CAHGQGwE95S5GM9UZh0F3ef2D3iEwJ59skh=EwW5HmDJPe2aXog@mail.gmail.com>
> On Tue, Apr 18, 2017 at 7:02 PM, Masahiko Sawada <sawada.mshk@gmail.com> wrote:
> > On Tue, Apr 18, 2017 at 6:40 PM, Kyotaro HORIGUCHI
> > <horiguchi.kyotaro@lab.ntt.co.jp> wrote:
> >> At Tue, 18 Apr 2017 14:58:50 +0900, Masahiko Sawada <sawada.mshk@gmail.com> wrote in
<CAD21AoBqSjUGx0LCDrjEDLB-yx2EvgLMdT8Nz4ZR_xpxrbMU+Q@mail.gmail.com>
> >>> On Tue, Apr 18, 2017 at 3:04 AM, Fujii Masao <masao.fujii@gmail.com> wrote:
> >>> > On Wed, Apr 12, 2017 at 2:36 AM, Masahiko Sawada <sawada.mshk@gmail.com> wrote:
> >>> > This description looks misleading. A quorum-based sync rep is basically
> >>> > more efficient when there are multiple standbys in s_s_names and you want
> >>> > to replicate the transactions to some of them synchronously. I think that
> >>> > this assumption should be documented explicitly. So I modified this
> >>> > description. Please see the modified version in the attached patch.
> >>>
> >>> You're right. The modified version looks good to me, thanks.

+     A quorum-based synchronous replication is basically more efficient than
+     a priority-based one when you specify multiple standbys in
+     <varname>synchronous_standby_names</> and want to replicate
+     the transactions to some of them synchronously. In this case,
+     the transactions in a priority-based synchronous replication must wait for
+     reply from the slowest standby in synchronous standbys chosen based on
+     their priorities, and which may increase the transaction latencies.
+     On the other hand, using a quorum-based synchronous replication may
+     improve those latencies because it makes the transactions wait only for
+     replies from the requested number of faster standbys in all the listed
+     standbys, i.e., such slow standby doesn't block the transactions.

> >> It looks better to me, too. But (even I'm not sure, of course)
> >> the sentences seem to need improvement.
> >>
> >> |    <para>
> >> |     Quorum-based synchronous replication is basically more
> >> |     efficient than priority-based one when you specify multiple
> >> |     standbys in <varname>synchronous_standby_names</> and want
> >> |     to synchronously replicate transactions to two or more of
> >> |     them. In the priority-based case, the replication master
> >> |     must wait for a reply from the slowest standby in the
> >> |     required number of standbys in priority order, which may
> >> |     slower than the rest.
> >
> > I supposed that Fujii-san pointed out that quorum-based sync
> > replication could be more efficient when we want to replicate the
> > transaction to "part of" standbys listed in s_s_names.
> 
> Yes.

Yes, am I wrote something opposing?

> Anyway, I pushed the patch except this paragraph.
> Regarding this paragraph, the patch for better descriptions is welcome.

+1

regards,

-- 
Kyotaro Horiguchi
NTT Open Source Software Center




pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: [HACKERS] some review comments on logical rep code
Next
From: Ashutosh Bapat
Date:
Subject: Re: [HACKERS] Proposal: Local indexes for partitioned table