Re: Hot Standby and handling max_standby_delay

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Hot Standby and handling max_standby_delay
Date: 2010-01-16 16:22:57
Message-ID: 1263658977.26654.50482.camel@ebony
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 2010-01-16 at 14:08 +0100, Dimitri Fontaine wrote:
> Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
> > On Fri, 2010-01-15 at 20:50 +0200, Heikki Linnakangas wrote:
> > Yes, it does. And I know you're thinking along those lines because we
> > are concurrently discussing how to handle re-connection after updates.
>
> With my State Machine proposal, we could only apply max_standby_delay if
> in sync state, and cancel query unconditionally otherwise.
>
> > The alternative is this: after being disconnected for 15 minutes we
> > reconnect. For the next X minutes the standby will be almost unusable
> > for queries while we catch up again.
>
> That's it. And it could be the cause of another GUC, do we want to give
> priority to catching-up to get back in sync, or to running queries. That
> would affect to when we apply max_standby_delay, and when set to prefer
> running queries it'd apply in any state as soon as we accept connections.

Agreed.

I'm wondering if it wouldn't just be easier to put in a plugin for
recovery conflict handling, so the user can decide what to do
themselves. That seems like a better plan than chewing through these
issues now.

--
Simon Riggs www.2ndQuadrant.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-01-16 16:37:02 Re: Hot Standby and handling max_standby_delay
Previous Message Tom Lane 2010-01-16 16:10:00 Re: Archive recovery crashes on win32 in HEAD - hot standby related?