Skip site navigation (1) Skip section navigation (2)

Re: CREATE INDEX and HOT - revised design

From: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, 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-30 16:41:01
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Tom Lane wrote:
> "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com> writes:
>> How about storing the snapshot which we used during planning in
>> CachedPlanSource, if at least one index was seen unusable because
>> its CREATE INDEX transaction was seen as in-progress ?
> I'm getting tired of repeating this, but: the planner doesn't use a
> snapshot.  System catalogs run on SnapshotNow.

But it would still do that - it would just compare the createxid of
the index against some snapshot, and the query would be replanned
if the cached result of this comparison differs from the one the
current snapshot yields.

It might well be that this won't work, because the planner is invoked
in situations where there is no active snapshot - I'm not sure if your 
comment refers to that case, or not.

greetings, Florian Pflug

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2007-03-30 16:42:46
Subject: Re: CREATE INDEX and HOT - revised design
Previous:From: Andrew HammondDate: 2007-03-30 16:34:19
Subject: Re: Help: reading the source

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group