pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Sami Imseih <samimseih@gmail.com>
Cc: Andrei Lepikhov <lepihov@gmail.com>
Cc: Greg Sabino Mullane <htamfids@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: Nikolay Samokhvalov <nik@postgres.ai>
Cc: Ilia Evdokimov <ilya.evdokimov@tantorlabs.com>
Subject: Re: track generic and custom plans in pg_stat_statements
Date: Tue, 22 Jul 2025 08:07:42 +0900
Message-ID: <aH7IPp_Hku02xHP2@paquier.xyz> (raw)
In-Reply-To: <CAA5RZ0ss-jmqeze0G8anztzLRJuMEgz9y3gTd-rgTc2Ejtwzvg@mail.gmail.com>
References: <CAA5RZ0v4Lqc3KOzFCOJd0hjBpF10W=-E6xn0z_HizZY9uxPR0w@mail.gmail.com>
	<CAA5RZ0vK_fah+ZS00hdg9uH2J_zBgV75x6ojYrc6+OJudnbKtQ@mail.gmail.com>
	<5f775987-8a93-452d-bb3f-a1de53836406@gmail.com>
	<CAA5RZ0uxcVu9MPXQc6qJ5mtYhH=_7b7jjaDnvg6Sft8jJ1NbXw@mail.gmail.com>
	<56d31e81-79d8-40bd-b957-0d6dc7c46589@gmail.com>
	<CAA5RZ0tdc4HeHdFRvVPWBdXP1JwCSjPPgiQyFk8fwhv=4fKmjw@mail.gmail.com>
	<2f2bde53-972d-402c-9da3-c5467cca00bf@gmail.com>
	<CAA5RZ0tfr50T1xYET=1Ei=NkbmS3e7MFhMJTrnoLi2oO7n2JsQ@mail.gmail.com>
	<064b9efd-92c9-4670-95f4-d911d4c7ddeb@gmail.com>
	<CAA5RZ0ss-jmqeze0G8anztzLRJuMEgz9y3gTd-rgTc2Ejtwzvg@mail.gmail.com>

On Mon, Jul 21, 2025 at 04:47:31PM -0500, Sami Imseih wrote:
> Last week I published a v11 that adds a field to QueryDesc, but as I thought
> about this more, how about we just add 2 bool fields in QueryDesc->estate
> ( es_cached_plan and es_is_generic_plan ), a field in CachedPlan (
> is_generic_plan )
> and after ExecutorStart, and if we have a cplan, we set the
> appropriate plan cache
> mode value. I think it's better to confine these new fields in Estate
> rather than
> at a higher level like QueryDesc. See v12.

Yes, I think that this is a much better idea to isolate the whole
concept and let pgss grab these values.  We have lived with such
additions for monitoring in EState a few times already, see for 
example de3a2ea3b264 and 1d477a907e63 that are tainted with my
fingerprints.
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../aH7IPp_Hku02xHP2@paquier.xyz/2-signature.asc)
  download

view thread (73+ messages)  latest in thread

Message-ID: <aH7IPp_Hku02xHP2@paquier.xyz>
Permalink:  ../aH7IPp_Hku02xHP2@paquier.xyz/
Also on:    postgresql.org/message-id/aH7IPp_Hku02xHP2@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: michael@paquier.xyz, samimseih@gmail.com, lepihov@gmail.com, htamfids@gmail.com, nik@postgres.ai, ilya.evdokimov@tantorlabs.com
  Subject: Re: track generic and custom plans in pg_stat_statements
  In-Reply-To: <aH7IPp_Hku02xHP2@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox