All,
Alright, so, the whole fn_extra stuff seems to be unrelated.. I'm not
sure when it's used (perhaps multiple calls to the same function in a
given query?), but the PLs have their own hash tables that they use for
storing functions that have been called. I had assumed that was done
through fmgr, but apparently not (or at least, I can't find where..).
I'm starting to wonder if we're trying to do too much with this
though. If all the PLs have to go through SPI to *get* plans (at least
ones we care about), perhaps we could just use SPI to implement the
plan invalidation?
Consider if we saved the DISCARD's transaction ID and store the
last-discard txn (or whenever the function was first prepared) in the
result of the SPI prepare and then detect if we need to switch to
replanning the query in SPI_execute_plan instead of just executing it.
Of course, we'd have to have enough info *to* replan it, but we should
be able to manage that.
Thoughts?
Stephen
In response to
Responses
pgsql-hackers by date
| Next: | From: Tom Lane | Date: 2011-01-08 21:59:11 |
| Subject: contrib/intarray (was Re: Fixing GIN for empty/null/full-scan cases) |
| Previous: | From: Joel Jacobson | Date: 2011-01-08 21:21:53 |
| Subject: Re: obj_unique_identifier(oid) |