Re: Quorum commit for multiple synchronous replication.

From: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
To: michael(dot)paquier(at)gmail(dot)com
Cc: masao(dot)fujii(at)gmail(dot)com, sawada(dot)mshk(at)gmail(dot)com, robertmhaas(at)gmail(dot)com, petr(at)2ndquadrant(dot)com, vik(at)2ndquadrant(dot)fr, simon(at)2ndquadrant(dot)com, josh(at)agliodbs(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Quorum commit for multiple synchronous replication.
Date: 2016-12-07 05:49:38
Message-ID: 20161207.144938.176033734.horiguchi.kyotaro@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Wed, 7 Dec 2016 13:26:38 +0900, Michael Paquier <michael(dot)paquier(at)gmail(dot)com> wrote in <CAB7nPqSyfsg=gHeqgXyzP0iGWvdyrXqnG-UENzfueaU=2m5-zg(at)mail(dot)gmail(dot)com>
> On Wed, Dec 7, 2016 at 12:32 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> > So, isn't it better to compare the performance of some algorithms and
> > confirm which is the best for quorum commit? Since this code is hot, i.e.,
> > can be very frequently executed, I'd like to avoid waste of cycle as much
> > as possible.
>
> It seems to me that it would be simple enough to write a script to do
> that to avoid any other noise: allocate an array with N random
> elements, and fetch the M-th element from it after applying a sort
> method. I highly doubt that you'd see much difference with a low
> number of elements, now if you scale at a thousand standbys in a
> quorum set you may surely see something :*)
> Anybody willing to try out?

Aside from measurement of the two sorting methods, I'd like to
point out that quorum commit basically doesn't need
sorting. Counting comforming santdbys while scanning the
walsender(receiver) LSN list comparing with the target LSN is
O(n). Small refactoring of SyncRerpGetOldestSyncRecPtr would
enough to do that.

regards,

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2016-12-07 06:05:40 Re: Logical decoding on standby
Previous Message Andreas Seltenreich 2016-12-07 05:35:28 Short reads in hash indexes (was: [sqlsmith] Failed assertion in _hash_splitbucket_guts)