Re: Re: [PATCH] To remove EXTEND INDEX - Mailing list pgsql-hackers

From Bernard Frankpitt
Subject Re: Re: [PATCH] To remove EXTEND INDEX
Date
Msg-id 3B504D0E.F5DB6939@erols.com
Whole thread Raw
In response to Re: Re: [PATCH] To remove EXTEND INDEX  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
> We don't let people add columns to an existing index so I don't see why
> we should have EXTEND INDEX unless index twiddling is more common with
> partial indexes.
> 

Nothing is common with partial indexes at the moment -- the feature is
not currently implemented, and I don't think other databases adopted the
idea.

From memory (*), Stonebraker's original intention for partial indexes
was that they would be used with really large tables in a situation
where you would might to process the table incrementally, a chunk at a
time, an example might be archiving historical data based on date. You
only want to archive information older than a certain date, so you use a
partial index predicated on t < t_0. You then do your archive processing
on those tuples, delete the tuples from the table, and extend the
predicate forward by an interval in aticipation of the next archiving
cycle.  

The example is not perfect, but I think that it indicates what the
original author's were thinking.  You also have to ask yourself when 
would this approach be better than just indexing the whole table, and
use the predicate in the query qualification.  

Bernie

(*) The partial indexes are mentioned briefly in one of the Stonebraker
papers. Sorry, I don't have an exact reference, but it is probably in
one of the Stonebraker publications referenced by
    http://techdocs.postgresql.org/oresources.php


pgsql-hackers by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: Planned changes to pg_am catalog
Next
From: Tom Lane
Date:
Subject: Re: SOMAXCONN (was Re: Solaris source code)