Re: Hot Standby Feedback should default to on in 9.3+

From: Daniel Farina <daniel(at)heroku(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Hot Standby Feedback should default to on in 9.3+
Date: 2012-11-30 23:42:31
Message-ID: CAAZKuFaMW8cYaAgXJsgPL3gWqupLTMpJXGOXSojWhzaXQ8jpsQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 30, 2012 at 11:35 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Fri, Nov 30, 2012 at 2:02 PM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
>> Does anybody have an argument against changing the default value?
>
> Well, the disadvantage of it is that the standby can bloat the master,
> which might be surprising to some people, too. But I don't really
> have a lot of skin in this game.

Under this precept, we used to not enable hot standby feedback and
instead allowed more or less unbounded staleness of the standby
through very long cancellation times. Although not immediate,
eventually we decided that enough people were getting confused by
sufficiently long standby delay caused by bad queries and idle in xact
backends, so now we have enabled feedback for new database replicants,
along with some fairly un-aggressive cancellation timeouts. It's all
rather messy and not very satisfying. We have yet to know if feedback
causes or solves problems, on average.

In very early versions we tried the default cancellation settings, and
query cancellation confused everyone a *lot*. That went away in a
hurry as a result, so I suppose it's not entirely unreasonable to say
in retrospect that the defaults can be considered kind of bad.

Longer term, I think I'd be keen to switch all our user-controlled
replication to logical except for use cases where the workload of the
standby is under our (and not the user's) control, such as for
failover.

Unfortunately, our experience with the feature and its use suggests
that the contract granted by the mechanisms seen in hot standby are
too complex for full-stack developers to keep in careful consideration
along with all the other things they want to do with their application
and/or have to remember about Postgres to get by.

--
fdr

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2012-11-30 23:58:05 Re: [PATCH] make -jN check fails / unset MAKEFLAGS in pg_regress.c
Previous Message Andres Freund 2012-11-30 23:41:04 Re: Hot Standby Feedback should default to on in 9.3+