Re: track generic and custom plans in pg_stat_statements
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Sami Imseih <samimseih@gmail.com>
Cc: Andrei Lepikhov <lepihov@gmail.com>, Greg Sabino Mullane <htamfids@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>, Nikolay Samokhvalov <nik@postgres.ai>, Ilia Evdokimov <ilya.evdokimov@tantorlabs.com>
Date: 2025-07-24T07:03:09Z
Lists: pgsql-hackers
Attachments
- v14-0001-pg_stat_statements-Add-counters-for-generic-and-.patch (text/x-diff) patch v14-0001
On Wed, Jul 23, 2025 at 12:15:06PM +0900, Michael Paquier wrote: > A small thing that would be cleaner is to split the patch into two > parts: one for the in-core backend addition and a second for PGSS. > Code paths are different, so it's simple to do. I have been looking at the backend part of the change to add the cached plan type to PlannedStmt, and found the concept clean. I have moved the definition of the new enum to plannodes.h, tweaked a couple of comments and the result seemed OK, so applied this part. Attached is the rest of the patch for PGSS, not really reviewed yet. I have noticed while going through it that pgssCachedPlanMode was not required. -- Michael
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