Re: Sync Rep v19

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Fujii Masao <masao.fujii@gmail.com>
Cc: Simon Riggs <simon@2ndquadrant.com>, Yeb Havinga <yebhavinga@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2011-03-05T16:31:12Z
Lists: pgsql-hackers
On Mar 5, 2011, at 11:17 AM, Fujii Masao <masao.fujii@gmail.com> wrote:
> On Sun, Mar 6, 2011 at 12:07 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
>> I'm not in favour.
>> 
>> If the user has a preferred order, they can specify it. If there is no
>> preferred order, how will we maintain that order?
>> 
>> What are the rules for maintaining this arbitrary order?
> 
> Probably what Robert, Yeb and I think is to leave the current
> sync standby in sync mode until either its connection is closed
> or higher priority standby connects. No complicated rule is
> required.
> 
> To do that, how about tracking which standby is currently in
> sync mode? Each walsender checks whether its priority is
> higher than that of current sync one, and if yes, it takes over.

That is precisely what I would expect to happen, and IMHO quite useful.

...Robert