> One option might be to use a local hash table, keyed the same way as the > shared pgss hash (excluding dbid), to handle cases where a backend has > more than one active cached plan. Then at ExecutorEnd, the local entry could > be looked up and passed to pgss_store. Not sure if this is worth the effort vs > what has been committed.
I should also add that making this information available in PlannedStmt allows for EXPLAIN to also utilize this information. I am thinking we can add this information as part of core EXPLAIN or as an option in pg_overexplain. -- Sami