Re: Hot standby and b-tree killed items - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Hot standby and b-tree killed items
Date
Msg-id 494C9CEB.5000605@enterprisedb.com
Whole thread Raw
In response to Re: Hot standby and b-tree killed items  (Gregory Stark <stark@enterprisedb.com>)
Responses Re: Hot standby and b-tree killed items
Re: Hot standby and b-tree killed items
List pgsql-hackers
Gregory Stark wrote:
> Simon Riggs <simon@2ndQuadrant.com> writes:
> 
>> Increasing the waiting time increases the failover time and thus
>> decreases the value of the standby as an HA system. Others value high
>> availability higher than you and so we had agreed to provide an option
>> to allow the max waiting time to be set.
> 
> Sure, it's a nice option to have. But I think the default should be to pause
> WAL replay.

I think I agree that pausing should be the default. If for no other 
reason, because I can't think of a good default for max_standby_delay.

It would be nice to have a setting to specify the max. amount of 
unapplied WAL before killing queries. When the primary isn't doing much, 
you might want wait longer before killing queries, and if you're falling 
behind a lot, you might want to kill queries more aggressively to catch 
up. I guess that doesn't quite fit the current architecture; you'd need 
to peek ahead to see how much unapplied WAL there is.

> The question I had was whether your solution for btree pointers marked dead
> and later dropped from the index works when the user hasn't configured a
> timeout and doesn't want standby queries killed.

Yes, it's not any different from vacuum WAL records.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: Is "Window" really safe as a global typedef name?
Next
From: Heikki Linnakangas
Date:
Subject: Re: Hot standby and b-tree killed items