Re: Hot standby and b-tree killed items

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: Simon Riggs <simon(at)2ndQuadrant(dot)com>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Hot standby and b-tree killed items
Date: 2008-12-20 07:21:15
Message-ID: 494C9CEB.5000605@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gregory Stark wrote:
> Simon Riggs <simon(at)2ndQuadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2008-12-20 07:25:27 Re: Hot standby and b-tree killed items
Previous Message David Fetter 2008-12-20 06:24:21 Re: Is "Window" really safe as a global typedef name?