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

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Hot Standby Feedback should default to on in 9.3+
Date: 2012-11-30 20:46:06
Message-ID: 50B91B0E.2000102@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 30.11.2012 21:02, Andres Freund wrote:
> Hi,
>
> The subject says it all.
>
> There are workloads where its detrimental, but in general having it
> default to on improver experience tremendously because getting conflicts
> because of vacuum is rather confusing.
>
> In the workloads where it might not be a good idea (very long queries on
> the standby, many dead tuples on the primary) you need to think very
> carefuly about the strategy of avoiding conflicts anyway, and explicit
> configuration is required as well.
>
> Does anybody have an argument against changing the default value?

-1. By default, I would expect a standby server to not have any
meaningful impact on the performance of the master. With hot standby
feedback, you can bloat the master very badly if you're not careful.

Think of someone setting up a test server, by setting it up as a standby
from the master. Now, when someone holds a transaction open in the test
server, you get bloat in the master. Or if you set up a standby for
reporting purposes - a very common use case - you would not expect a
long running ad-hoc query in the standby to bloat the master. That's
precisely why you set up such a standby in the first place.

You could of course still turn it off, but you would have to know about
it in the first place. I think it's a reasonable assumption that a
standby does *not* affect the master (aside from the bandwidth and disk
space required to retain/ship the WAL). If you have to remember to
explicitly set a GUC to get that behavior, that's a pretty big gotcha.

- Heikki

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-11-30 20:47:59 Re: Re: missing LockBuffer(buffer, BUFFER_LOCK_SHARE) in trigger.c GetTupleForTrigger?
Previous Message Josh Berkus 2012-11-30 20:10:11 Re: Hot Standby Feedback should default to on in 9.3+