Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group