This is what I've done so far on the plan-invalidation project. This
creates a plan cache manager module and restructures things enough for
prepared statements to use it (both those generated at the SQL level
by PREPARE, and those coming from extended query protocol messages).
I haven't yet done anything about plans cached via SPI, and there are
some other open issues too, notably making sure that the search_path
during a replan is the same as it was the first time.
This patch includes getting rid of QueryContext as well as the
ProcessUtility API changes I suggested recently. That makes it a bit
wide-ranging, so I'm inclined to apply it soon before dealing with
SPI and the other loose ends.
Comments?
regards, tom lane