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

From Florian G. Pflug
Subject Re: CREATE INDEX and HOT - revised design
Date
Msg-id 460D3D9D.5080400@phlo.org
Whole thread Raw
In response to Re: CREATE INDEX and HOT - revised design  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> "Pavan Deolasee" <pavan.deolasee@gmail.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


pgsql-hackers by date:

Previous
From: "Pavan Deolasee"
Date:
Subject: Re: CREATE INDEX and HOT - revised design
Next
From: "Andrew Hammond"
Date:
Subject: Re: [pgsql-www] Help: reading the source