Re: track generic and custom plans in pg_stat_statements

From: Sami Imseih <samimseih(at)gmail(dot)com>
To: Ilia Evdokimov <ilya(dot)evdokimov(at)tantorlabs(dot)com>
Cc: Greg Sabino Mullane <htamfids(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: track generic and custom plans in pg_stat_statements
Date: 2025-05-29 19:07:27
Message-ID: CAA5RZ0uOriAV-PJZz2imVjORsdiuFRDiyAfMfqiFGngoOtJ1Mg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2025-05-29 19:14:48 get speed help
Previous Message Matthias van de Meent 2025-05-29 19:04:15 Re: pg18: Virtual generated columns are not (yet) safe when superuser selects from them