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

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Sami Imseih <samimseih(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [[BUG] pg_stat_statements crashes with var and non-var expressions in IN clause
Date: 2026-01-13 07:13:08
Message-ID: aWXwhOsDSmWR3oBV@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bertrand Drouvot 2026-01-13 07:27:11 Re: Safer hash table initialization macro
Previous Message Michael Paquier 2026-01-13 07:09:46 Re: JumbleQuery ma treat different GROUP BY expr as the same