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

From Gregory Stark
Subject Re: CREATE INDEX and HOT - revised design
Date
Msg-id 873b3odmsj.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: CREATE INDEX and HOT - revised design  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: CREATE INDEX and HOT - revised design
List pgsql-hackers
"Tom Lane" <tgl@sss.pgh.pa.us> writes:

> However, if you design something where an index becomes usable due
> to the passage of time rather than an explicit mark-valid step,
> there's gonna be a problem.  I'd suggest trying to stick to the
> way CREATE INDEX CONCURRENTLY does it...

I'm a bit skeptical about the idea of CREATE INDEX (ie, non-concurrent)
creating an index that won't be used for a while. We get enough people asking
why Postgres isn't using an index as it is... Besides, it seems if people are
happy to have indexes take a long time to build they could just do a
concurrent build. The reason they do non-concurrent builds is precisely
because they're willing to take an exclusive lock in order to have them
complete as soon as possible.

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.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Group Commit
Next
From: Tom Lane
Date:
Subject: Re: Group Commit