> > Attached is my counter-proposal, where I have settled down to four
> > categories of PlannedStmt:
> > - "standard" PlannedStmt, when going through the planner.
> > - internally-generated "fake" PlannedStmt.
> > - custom cache
> > - generic cache
>
> Thanks for the update! I plan on reviewing this tomorrow.

The only comment I have is I think we need a NOT_SET
member, so it can simplify the life of extensions that have code
paths which may or may not have a PlannedStmt, such as
pgss_store. In pgss_store, I don't want to pass the entire PlannedStmt,
nor do I want to pass PLAN_STMT_INTERNAL in the call during
post_parse_analyze, in which case we don't have a plan. Using
PLAN_STMT_INTERNAL as a default value if odd.

v15 includes the change with the above as well as the pg_stat_statements
changes.


--
Sami

Attachment: v15-0001-Introduce-planOrigin-field-in-PlannedStmt-to-rep.patch
Description: Binary data

Attachment: v15-0002-Add-counters-for-generic-and-custom-plans.patch
Description: Binary data

Reply via email to