Re: Index Page Split logging - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: Index Page Split logging
Date
Msg-id 20080101212016.GC19496@svana.org
Whole thread Raw
In response to Re: Index Page Split logging  (Simon Riggs <simon@2ndquadrant.com>)
Responses Re: Index Page Split logging  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-hackers
On Tue, Jan 01, 2008 at 08:55:58PM +0000, Simon Riggs wrote:
> On Tue, 2008-01-01 at 14:02 -0500, Tom Lane wrote:
> > Simon Riggs <simon@2ndquadrant.com> writes:
> > > If we could log *only* the insert that caused the split, rather than the
> > > split itself, we would avoid that situation entirely.
> >
> > How are you going to avoid the need to run user-defined functions
> > (specifically, the btree comparison functions) during replay?
>
> Seems like a good objection. Just exercising my lateral thought muscles.

It seems to me you should be able to manage an intermediate version
where (in for example GiST) you store the output of picksplit. i.e. you
describe your split as: items A,B,C went to the left and the rest went
to the right page. This would allow you to reconstruct the split
completely without actually having to write all the data.

The only thing I'm not sure about is whether it's easy to get the
relevent inforation to make this efficient.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Those who make peaceful revolution impossible will make violent revolution inevitable.
>  -- John F Kennedy

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Table rewrites vs. pending AFTER triggers
Next
From: Simon Riggs
Date:
Subject: Re: Index Page Split logging