Re: Keepalive for max_standby_delay

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Keepalive for max_standby_delay
Date: 2010-07-03 11:59:10
Message-ID: 4C2F260E.10100@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 02/07/10 23:36, Tom Lane wrote:
> Robert Haas<robertmhaas(at)gmail(dot)com> writes:
>> I haven't been able to wrap my head around why the delay should be
>> LESS in the archive case than in the streaming case. Can you attempt
>> to hit me with the clue-by-four?
>
> In the archive case, you're presumably trying to catch up, and so it
> makes sense to kill queries faster so you can catch up. The existing
> code essentially forces instant kill when reading from archive, for any
> reasonable value of max_standby_delay (because the archived timestamps
> will probably be older than that). That's overenthusiastic in my view,
> but you can get that behavior if you want it with this patch by setting
> max_standby_archive_delay to zero. If you don't want it, you can use
> something larger. If you don't think that max_standby_archive_delay
> should be less than max_standby_streaming_delay, you can set them the
> same, too.

It would seem logical to use the same logic for archive recovery as we
do for streaming replication, and only set XLogReceiptTime when you have
to wait for a WAL segment to arrive into the archive, ie. when
restore_command fails.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-07-03 14:13:09 Re: reassign owned to change the ownership for op class and family
Previous Message Robert Haas 2010-07-03 11:02:40 Re: Keeping separate WAL segments for each database