On 3/30/07, Tom Lane <[EMAIL PROTECTED]> wrote:
I do not think you can assume that the plan won't be used later with some older snapshot. Consider recursive plpgsql functions for a counterexample: the inner occurrence might be the first to arrive at a given line of the function, hence the first to plan it, yet when we return to the outer instance we might revert to an older snapshot.
Thanks for making me aware of such scenarios. What it also means is that a transaction may use an older snapshot after it created the index. So to be on safer side, we should not use an index created in the same transaction if we saw HOT-updated RECENTLY_DEAD or DELETE_IN_PROGRESS tuples while building the index (with HOT we don't want to index these tuples). Not such a bad restriction to live with. May be we can do something with command ids to solve this once we get the basic stuff ready. Thanks, Pavan -- EnterpriseDB http://www.enterprisedb.com