pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Sami Imseih <samimseih.pg@gmail.com>
Cc: Lukas Fittl <lukas@fittl.com>
Cc: Gaurav Singh <gaurav.singh@yugabyte.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: pg_stat_statements stores WITH HOLD cursor query with literals
Date: Wed, 28 Oct 2026 08:35:06 +0900
Message-ID: <auE1KoaP-pZBSlwc@paquier.xyz> (raw)
In-Reply-To: <CAN12+Y+ZCk470o89Bjxx4HJNG2dO_=qmey+ibLLxvf8yHQoPgA@mail.gmail.com>
References: <CAN12+YL7jf5_04Lme1Qaf2=_JuMAKAoCQiSY7-4__Svfc4igBA@mail.gmail.com>
	<CAEcQ1bYf03gGvvZWXCTv2L198zNArFrVoNDNQWecJ_7YmfE6UA@mail.gmail.com>
	<CAN12+YJdyb6zRHU+3owvBpKxgqB-tweRjjhUUTa5TyDn433GRw@mail.gmail.com>
	<CAEcQ1bZ0oW_RaNFAo6S9COOLnhdskx=z6p285WALq10QgVpYBA@mail.gmail.com>
	<atl-hB3haQF62tlN@paquier.xyz>
	<atruZFUdH40HVUJh@paquier.xyz>
	<CAN12+YKFJot+StpC7Dgwb68EYVWCZVrB5Gb5L8KML=8srn5OJA@mail.gmail.com>
	<at_g5VZJD2ZCluDW@paquier.xyz>
	<CAP53PkwmCc0n1krUcGZ3ti3Zzue1kESV4zeOYNsEPH6MSz0ovw@mail.gmail.com>
	<CAN12+Y+ZCk470o89Bjxx4HJNG2dO_=qmey+ibLLxvf8yHQoPgA@mail.gmail.com>

On Tue, Oct 27, 2026 at 05:03:21PM -0500, Sami Imseih wrote:
> So at least for these two contrib modules, preserving the current behavior
> would seem to require keeping the nesting decision decoupled from a single
> shared nesting_level.
> 
> Those differences could perhaps be worked around, but each extension would
> still need to decide what the value means for its own purposes, so they may
> still need some form of queryDesc state.

And I doubt that it would fly far without a way to handle the
concurrent activity of more than one extension.  FWIW, to me,
QueryDesc is a natural fit to track the nesting level, still my
previous sentence points out that we had better use a different memory
area for each definition we'd want to put on a query basis.

I am wondering if we don't have a bit more we could do for each
QueryDesc at extension level, like activity tracking or stuff in this
area.  
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (18+ messages)  latest in thread

Message-ID: <auE1KoaP-pZBSlwc@paquier.xyz>
Permalink:  ../auE1KoaP-pZBSlwc@paquier.xyz/
Also on:    postgresql.org/message-id/auE1KoaP-pZBSlwc@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: michael@paquier.xyz, samimseih.pg@gmail.com, lukas@fittl.com, gaurav.singh@yugabyte.com
  Subject: Re: pg_stat_statements stores WITH HOLD cursor query with literals
  In-Reply-To: <auE1KoaP-pZBSlwc@paquier.xyz>
  References: <CAN12+YL7jf5_04Lme1Qaf2=_JuMAKAoCQiSY7-4__Svfc4igBA@mail.gmail.com> <CAEcQ1bYf03gGvvZWXCTv2L198zNArFrVoNDNQWecJ_7YmfE6UA@mail.gmail.com> <CAN12+YJdyb6zRHU+3owvBpKxgqB-tweRjjhUUTa5TyDn433GRw@mail.gmail.com> <CAEcQ1bZ0oW_RaNFAo6S9COOLnhdskx=z6p285WALq10QgVpYBA@mail.gmail.com> <atl-hB3haQF62tlN@paquier.xyz> <atruZFUdH40HVUJh@paquier.xyz> <CAN12+YKFJot+StpC7Dgwb68EYVWCZVrB5Gb5L8KML=8srn5OJA@mail.gmail.com> <at_g5VZJD2ZCluDW@paquier.xyz> <CAP53PkwmCc0n1krUcGZ3ti3Zzue1kESV4zeOYNsEPH6MSz0ovw@mail.gmail.com> <CAN12+Y+ZCk470o89Bjxx4HJNG2dO_=qmey+ibLLxvf8yHQoPgA@mail.gmail.com> <auE1KoaP-pZBSlwc@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