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 494B7674.5040804@enterprisedb.com
Whole thread Raw
In response to Re: Hot standby and b-tree killed items  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Hot standby and b-tree killed items  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
Simon Riggs wrote:
> We have infrastructure in place to make this work correctly, just need
> to add latestRemovedXid field to xl_btree_vacuum. So that part is easily
> solved.

That's tricky because there's no xmin/xmax on index tuples. You could 
conservatively use OldestXmin as latestRemovedXid, but that could stall 
the WAL redo a lot more than necessary. Or you could store 
latestRemovedXid in the page header, but that would need to be 
WAL-logged to ensure that it's valid after crash. Or you could look at 
the heap to fetch the xmin/xmax, but that would be expensive.

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


pgsql-hackers by date:

Previous
From: Grzegorz Jaskiewicz
Date:
Subject: Re: possible bug in 8.4
Next
From: Teodor Sigaev
Date:
Subject: Re: Review: B-Tree emulation for GIN