Re: [[BUG] pg_stat_statements crashes with var and non-var expressions in IN clause - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [[BUG] pg_stat_statements crashes with var and non-var expressions in IN clause
Date
Msg-id aWXwhOsDSmWR3oBV@paquier.xyz
Whole thread Raw
In response to [[BUG] pg_stat_statements crashes with var and non-var expressions in IN clause  (Sami Imseih <samimseih@gmail.com>)
Responses Re: [[BUG] pg_stat_statements crashes with var and non-var expressions in IN clause
List pgsql-hackers
On Mon, Jan 12, 2026 at 10:29:51PM -0600, Sami Imseih wrote:
> With asserts enabled:
> ```
> TRAP: failed Assert("len_to_wrt >= 0"), File:
> "../contrib/pg_stat_statements/pg_stat_statements.c", Line: 2906, PID:
> 299892
> postgres: ubuntu regression_pg_stat_statements [local]
> SELECT(ExceptionalCondition+0x74)[0x5bf8a012dc44]
> ```

Oops.

> If there is agreement to this fix, I think it should be backpacthed to
> all versions that
> support squashing of IN-lists.

It's pretty clear to me that this is a bug and that we are going to
backpatch something.  I am running out of battery today, will look
again at that later except if somebody beats me to it.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: JumbleQuery ma treat different GROUP BY expr as the same
Next
From: Bertrand Drouvot
Date:
Subject: Re: Safer hash table initialization macro