Re: track generic and custom plans in pg_stat_statements
Sami Imseih <samimseih@gmail.com>
From: Sami Imseih <samimseih@gmail.com>
To: Ilia Evdokimov <ilya.evdokimov@tantorlabs.com>
Cc: Greg Sabino Mullane <htamfids@gmail.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-05-29T19:07:27Z
Lists: pgsql-hackers
> It turns out that 1722d5eb05d8e reverted 525392d5727f, which > made CachedPlan available in QueryDesc and thus > available to pgss_ExecutorEnd. I also forgot to mention, the revert also removes the generic plan is_reused logic: ``` bool is_reused; /* is it a reused generic plan? */ ``` which we had to account for up until v5. So this simplifies the tracking a bit more as the only states to track are "generic plan" or "custom plan" only. -- Sami Imseih Amazon Web Services (AWS)
Commits
-
pg_stat_statements: Add counters for generic and custom plans
- 3357471cf9f5 19 (unreleased) landed
-
Rename CachedPlanType to PlannedStmtOrigin for PlannedStmt
- e125e360020a 19 (unreleased) landed
-
Introduce field tracking cached plan type in PlannedStmt
- 719dcf3c4226 19 (unreleased) landed