public inbox for [email protected]  
help / color / mirror / Atom feed
From: Michael Paquier <[email protected]>
To: Sami Imseih <[email protected]>
Cc: Dmitry Dolgov <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: [[BUG] pg_stat_statements crashes with var and non-var expressions in IN clause
Date: Mon, 19 Jan 2026 17:14:46 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAA5RZ0vpwnB+Bmm7spRF-z2xfXhVq94-LHoDtno+_ok=gbThAw@mail.gmail.com>
References: <CAA5RZ0ts9qiONnHjjHxPxtePs22GBo4d3jZ_s2BQC59AN7XbAA@mail.gmail.com>
	<nekbxv5payvd26jf6q6b57w732cmct7ralb7ajwayr6xggifws@wc7yiimdoylk>
	<CAA5RZ0vNMm1v8ai_5zid5M8uf8Z7V7TH7Bh8B5ZHKbeLieU=gQ@mail.gmail.com>
	<w4olj5ddpehhipzggtdmhm23uermzugudyogq462lcytnrmgwj@md4l5p62zrt6>
	<CAA5RZ0vpwnB+Bmm7spRF-z2xfXhVq94-LHoDtno+_ok=gbThAw@mail.gmail.com>

On Thu, Jan 15, 2026 at 02:53:20PM -0600, Sami Imseih wrote:
>> As far as I recall it was an
>> intentional design decision, and to adjust newa->list_end in such
>> scenarios we need to solve the original problem of finding an end
>> location of any arbitrary expression,
> 
> I'm not sure I follow. How would we adjust newa->list_end?

I may be missing something, of course, but Dmitry's message reads as
follows to me:
"It was a design choice to track the start and end locations because
we needed that for arrays, and resetting the locations if we have Vars
in the list like you are suggesting is OK by me."

I am going to re-read a bit more the area and think about a couple of
patterns to test, but I think that your suggested solution should be
OK to disable the list squashing as you are suggesting in this case:
there is nothing we can really do, and IMO that would still be OK for
most users because squashing has been designed for non-Var lists as
far as I know.  This is a rare pattern for long lists in IN arrays, as
well.  I'll sleep on it for now.
--
Michael


Attachments:

  [application/pgp-signature] signature.asc (833B, ../[email protected]/2-signature.asc)
  download

view thread (6+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: [[BUG] pg_stat_statements crashes with var and non-var expressions in IN clause
  In-Reply-To: <[email protected]>

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

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