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 494C9DE7.1060505@enterprisedb.com
Whole thread Raw
In response to Re: Hot standby and b-tree killed items  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
Heikki Linnakangas wrote:
> Gregory Stark wrote:
>> 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.

No wait, there is a nasty corner-case. When an index tuple is marked as 
killed, no WAL record is written. Since there's now WAL record, it won't 
be killed in the slave yet. But if we take a full-page image of that 
page later for some other operation, the LP_DEAD flag is included in the 
full-page image. If the flag sneaks into the slave without an explicit 
WAL record like that, there's no latestRemovedXid for the slave to wait on.

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


pgsql-hackers by date:

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