From: Heikki Linnakangas on
On 02/07/10 23:36, Tom Lane wrote:
> Robert Haas<robertmhaas(a)gmail.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

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: Heikki Linnakangas on
On 03/07/10 18:32, Tom Lane wrote:
> Heikki Linnakangas<heikki.linnakangas(a)enterprisedb.com> writes:
>> 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.
>
> That would not do what you want at all in the case where you're
> recovering from archive --- XLogReceiptTime would never advance
> at all for the duration of the recovery.

Do you mean when using something like pg_standby, which does the waiting
itself?

> It might be useful if you knew that it was a standby-with-log-shipping
> situation, but we have no way to tell the difference.

With pg_standby etc. you use standby_mode=off. Same with traditional
archive recovery. In standby mode, it's on.

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

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers