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

From Tom Lane
Subject Re: CREATE INDEX and HOT - revised design
Date
Msg-id 21734.1175277241@sss.pgh.pa.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  ("Simon Riggs" <simon@2ndquadrant.com>)
List pgsql-hackers
"Pavan Deolasee" <pavan.deolasee@gmail.com> writes:
> Actually, if we are using Serializable Snapshot then there is no chance
> to replan the query before the transaction completes and the next
> transaction to start in the session must see the index and hence
> we must replan. So it would be enough just to associate a transaction
> id with the cached plan. If this xid is set and our transaction id is
> different than that, we replan.

Hm.  So anytime we reject a potentially useful index as being not valid
yet, we mark the plan as "only good for this top-level transaction"?
That seems possibly workable --- in particular it doesn't get more
complicated as soon as you consider multiple such indexes.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Florian G. Pflug"
Date:
Subject: Re: CREATE INDEX and HOT - revised design
Next
From: "Simon Riggs"
Date:
Subject: Re: CREATE INDEX and HOT - revised design