Re: max_standby_delay considered harmful - Mailing list pgsql-hackers

From Robert Haas
Subject Re: max_standby_delay considered harmful
Date
Msg-id AANLkTikEFWm3YgU0PXjwuAP8opIBEjIe2X6iMKPRW8DE@mail.gmail.com
Whole thread Raw
In response to Re: max_standby_delay considered harmful  (Florian Pflug <fgp@phlo.org>)
List pgsql-hackers
On Mon, May 10, 2010 at 6:13 AM, Florian Pflug <fgp@phlo.org> wrote:
> On May 10, 2010, at 11:43 , Heikki Linnakangas wrote:
>> If you're not going to apply any more WAL records before shutdown, you
>> could also just release all the AccessExclusiveLocks held by the startup
>> process. Whatever the transaction was doing with the locked relation, if
>> we're not going to replay any more WAL records before shutdown, we will
>> not see the transaction committing or doing anything else with the
>> relation, so we should be safe. Whatever state the data on disk is in,
>> it must be valid, or we would have a problem with crash recovery
>> recovering up to this WAL record and then starting up too.
>
> Sounds plausible. But wouldn't this imply that HS could *always* postpone the acquisition of an AccessExclusiveLocks
untilright before the corresponding commit record is replayed? If fail to see a case where this would fail, yet
recoveryin case of an intermediate crash would be correct. 

Yeah, I'd like to understand this, too.  I don't have a clear
understanding of when HS needs to take locks here in the first place.

[removing Josh Berkus's persistently bouncing email from the CC line]

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: max_standby_delay considered harmful
Next
From: Heikki Linnakangas
Date:
Subject: Re: max_standby_delay considered harmful