Re: prefix btree implementation - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: prefix btree implementation
Date
Msg-id 20051005123854.GB5239@surnet.cl
Whole thread Raw
In response to Re: prefix btree implementation  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Oct 05, 2005 at 12:50:41AM -0400, Tom Lane wrote:
> Qingqing Zhou <zhouqq@cs.toronto.edu> writes:
> > 1/ What types of prefix compression shall we support?
> 
> Given the requirement of datatype independence, this idea seems a
> complete nonstarter to me...

How about having each type optionally provide the required routines?
Thus we could provide them at least for the most common datatypes, and
the system would continue working as currently for the rest (including
user-defined types).  Cross-column prefixes would be hard to handle I
guess, as well as TOASTed data.

One problem I do see is what happens if I need to insert a new tuple in
the page that doesn't share the prefix.  It obviously would have to be
the leftmost or rightmost item on the page, but it's possible.

-- 
Alvaro Herrera                                http://www.PlanetPostgreSQL.org
A male gynecologist is like an auto mechanic who never owned a car.
(Carrie Snow)


pgsql-hackers by date:

Previous
From: Gaetano Mendola
Date:
Subject: Re: Vacuum and Transactions
Next
From: Rod Taylor
Date:
Subject: Re: Vacuum and Transactions