Re: Fix of doc for synchronous_standby_names. - Mailing list pgsql-hackers

From Kyotaro HORIGUCHI
Subject Re: Fix of doc for synchronous_standby_names.
Date
Msg-id 20160422.110928.18809311.horiguchi.kyotaro@lab.ntt.co.jp
Whole thread Raw
In response to Re: Fix of doc for synchronous_standby_names.  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Fix of doc for synchronous_standby_names.  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
List 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@gmail.com> wrote in
<CA+TgmoZLgs7_Lex4R3Q23Geo6BTfVEM-0Hm1HKhJzM1gxBFUJA@mail.gmail.com>
> On Thu, Apr 21, 2016 at 1:01 AM, Amit Langote
> <Langote_Amit_f8@lab.ntt.co.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





pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: pg_stat_activity crashes
Next
From: Etsuro Fujita
Date:
Subject: Re: Optimization for updating foreign tables in Postgres FDW