From: Michael Paquier <michael@paquier.xyz>
To: Dilip Kumar <dilipbalaut@gmail.com>
Cc: a.kozhemyakin@postgrespro.ru, pgsql-bugs@lists.postgresql.org, Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>
Subject: Re: BUG #18947: TRAP: failed Assert("len_to_wrt >= 0") in pg_stat_statements
Date: Sun, 8 Jun 2025 11:39:44 +0900
Message-ID: <aET38DIyBht33bIP@paquier.xyz> (raw)
In-Reply-To: <CAFiTN-tGux5MZ9Hk2wKv5sVhk7eDq2AHaT79LxnQbVamxoRn9Q@mail.gmail.com>
References: <18947-cdd2668beffe02bf@postgresql.org>
<CAFiTN-tGux5MZ9Hk2wKv5sVhk7eDq2AHaT79LxnQbVamxoRn9Q@mail.gmail.com>
On Sat, Jun 07, 2025 at 10:19:53PM +0530, Dilip Kumar wrote:
> I didn't get time to debug, I might look into it tomorrow if someone
> doesn't do it before that, but I am able to reproduce the issue and
> seems like problem is with respect to computing the quer_loc in below
> loop, and due to that 'quer_loc' is becoming bigger than query_len and
> hitting the assert.
The loop in charge of assigning the constants in the queries needs to
be smarter in terms of the new locations assigned to sub-queries, here
the VALUES one.
499edb09741b is the origin of the regression, so open item assigned to
me (will look into it later), adding Anthonin in CC.
--
Michael
Attachments:
[application/pgp-signature] signature.asc (832B, ../aET38DIyBht33bIP@paquier.xyz/2-signature.asc)
download
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-bugs@postgresql.org
Cc: michael@paquier.xyz, dilipbalaut@gmail.com, anthonin.bonnefoy@datadoghq.com
Subject: Re: BUG #18947: TRAP: failed Assert("len_to_wrt >= 0") in pg_stat_statements
In-Reply-To: <aET38DIyBht33bIP@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