Re: CREATE INDEX and HOT - revised design

From: "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com>
To: "Gregory Stark" <stark(at)enterprisedb(dot)com>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>, "Simon Riggs" <simon(at)2ndquadrant(dot)com>, "Bruce Momjian" <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, "Pavan Deolasee" <pavan(dot)deolasee(at)enterprisedb(dot)com>
Subject: Re: CREATE INDEX and HOT - revised design
Date: 2007-03-29 17:34:20
Message-ID: 2e78013d0703291034y575e3dd8l2e72c6cfadba794c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 3/29/07, Gregory Stark <stark(at)enterprisedb(dot)com> wrote:
>
> Besides, it seems if people are
> happy to have indexes take a long time to build they could just do a
> concurrent build.

I think we discussed this earlier. One of the down-side of CIC is that
it needs two complete heap scans. Apart from that CIC itself needs
to wait for all existing transactions to finish and more than one
instance of CIC can not be run on a table.

> Earlier we were talking about not inserting any HOT tuples until the index
> became valid. The goal of having an xid on the index was so we would know
> when
> we could start doing HOT updates again. That seems like a much lesser cost
> than not being able to use the index until all live transactions exit.

What I am proposing is to keep index unusable for existing transactions.
The index is available for all new transactions even if there are unfinished
existing transactions. Is that a big problem ? Well, I still need buy-in and
review from Tom and others on the design, but it seems workable to me.

Thanks,
Pavan

--

EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2007-03-29 17:40:13 Re: Patch queue concern
Previous Message Joshua D. Drake 2007-03-29 17:31:45 Re: Patch queue concern