Re: CREATE INDEX and HOT - revised design - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: CREATE INDEX and HOT - revised design
Date
Msg-id 200703211729.l2LHTsi09212@momjian.us
Whole thread Raw
In response to Re: CREATE INDEX and HOT - revised design  ("Pavan Deolasee" <pavan.deolasee@gmail.com>)
Responses Re: CREATE INDEX and HOT - revised design  (Bruce Momjian <bruce@momjian.us>)
Re: CREATE INDEX and HOT - revised design  ("Simon Riggs" <simon@2ndquadrant.com>)
List pgsql-hackers
Pavan Deolasee wrote:
> On 3/21/07, Bruce Momjian <bruce@momjian.us> wrote:
> >
> >
> >
> > I am worried that will require CREATE INDEX to wait for a long time.
> 
> 
> 
> Not unless there are long running transactions. We are not waiting
> for the lock, but only for the current transactions to finish.

Waiting for all transactions might take a while, no?

> > Is the pg_index xid idea too complex?  It seems to give you the
> > per-tuple index bit, without the restrictions.
> 
> 
> 
> How do we handle HEAP_ONLY tuple cleanup ? If I understood
> the proposal correctly, at the end of the create index, a HEAP_ONLY
> tuple may have pointer from the new index, isn't it ?

Right.  You would need vacuum to clean up the HEAP_ONLY tuples.  I just
sent an email about those deails.  We might have autovacuum check
pg_index and do it automatically.

--  Bruce Momjian  <bruce@momjian.us>          http://momjian.us EnterpriseDB
http://www.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: [PATCHES] Bitmapscan changes
Next
From: Jan Wieck
Date:
Subject: Re: Effects of GUC settings on automatic replans