Re: Fix of doc for synchronous_standby_names.

From: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
To: robertmhaas(at)gmail(dot)com
Cc: Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Fix of doc for synchronous_standby_names.
Date: 2016-04-22 02:09:28
Message-ID: 20160422.110928.18809311.horiguchi.kyotaro@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I'm not so confident on me but, please let me continue on this a
bit more for my understanding.

At Thu, 21 Apr 2016 13:33:23 -0400, Robert Haas <robertmhaas(at)gmail(dot)com> wrote in <CA+TgmoZLgs7_Lex4R3Q23Geo6BTfVEM-0Hm1HKhJzM1gxBFUJA(at)mail(dot)gmail(dot)com>
> On Thu, Apr 21, 2016 at 1:01 AM, Amit Langote
> <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> > ISTM, the sentence describes what happens in a *single instance* of
> > encountering duplicate (same name found in primary_conninfo of 2 or more
> > standbys). It's still one name but which of the standbys claims the spot
> > (for that name) of being a synchronous standby with given priority is
> > indeterminate.

Yes. I read it as the same.

> > Now, there can be multiple instances of encountering duplicates,
> > each for a different sync slot.

This is true from the past(call it single-sync-age). Not new for
multiple sync-standbys (call it multi-sync-age).

> > But this particular sentence seems to be talking
> > about what's the case for any given slot.
>
> Right, that's my reading also.

I don't certainly understnd what the 'sync slot' means. If it
means a name in a replication set description, that is, 'nameN'
in the following setting of s_s_names.

'2(name1, name2, name3)'

There may be two or more duplicates even in the
single-sync-age. But only one synchronous standby was allowed so
any 'sync slot' may have at least one matching synchronous
standby in the single-sync-age. This is what I see in the
sentense. Is this wrong?

Now, we can have multiple synchronous standbys so, for example,
if three standbys with the name 'name1', two of them are choosed
as synchronous. This is a new behavior in the multi-sync-age and
syncrep.c has been changed so as to do so.

For a supplemnet, the following case.

'5(name1, name2, name3)'

and the following standbys

(name1, name1, name2, name2, name3, name3)

The following standbys are choosed as synchronous.

(name1, name1, name2, name2, name3)

# However, 5 for three names causes a warning..

Am I still wrong?

regards,

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2016-04-22 02:19:03 Re: Optimization for updating foreign tables in Postgres FDW
Previous Message Kyotaro HORIGUCHI 2016-04-22 01:47:04 Re: pg_stat_activity crashes