Re: Sync Rep v19

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Yeb Havinga <yebhavinga(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Sync Rep v19
Date: 2011-03-05 16:49:43
Message-ID: 1299343783.10703.13295.camel@ebony
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, 2011-03-06 at 01:17 +0900, Fujii Masao wrote:
> On Sun, Mar 6, 2011 at 12:07 AM, Simon Riggs <simon(at)2ndquadrant(dot)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.

No, it is complex. The code is intentionally stateless, so unless you
have a rule you cannot work out which one is sync standby.

It is much more important to have robust takeover behaviour.

Changing this will require rethinking how that takeover works. And I'm
not doing that for something that is documented as "indeterminate".

If you care about the sequence then set the supplied parameter, which I
have gone to some trouble to provide.

> 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.
>
> Regards,
>

--
Simon Riggs http://www.2ndQuadrant.com/books/
PostgreSQL Development, 24x7 Support, Training and Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2011-03-05 16:51:18 Re: Sync Rep v19
Previous Message Tom Lane 2011-03-05 16:46:13 Re: Alpha4 release blockers (was Re: wrapping up this CommitFest)