Re: Hot standby and b-tree killed items

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Hot standby and b-tree killed items
Date: 2008-12-19 10:24:52
Message-ID: 494B7674.5040804@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Teodor Sigaev 2008-12-19 10:26:56 Re: Review: B-Tree emulation for GIN
Previous Message Grzegorz Jaskiewicz 2008-12-19 09:57:42 Re: possible bug in 8.4