Re: prefix btree implementation

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Qingqing Zhou <zhouqq(at)cs(dot)toronto(dot)edu>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: prefix btree implementation
Date: 2005-10-05 12:38:54
Message-ID: 20051005123854.GB5239@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Oct 05, 2005 at 12:50:41AM -0400, Tom Lane wrote:
> Qingqing Zhou <zhouqq(at)cs(dot)toronto(dot)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)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rod Taylor 2005-10-05 13:07:55 Re: Vacuum and Transactions
Previous Message Gaetano Mendola 2005-10-05 12:19:10 Re: Vacuum and Transactions