public inbox for [email protected]
help / color / mirror / Atom feedFrom: Michael Paquier <[email protected]>
To: Shruthi Gowda <[email protected]>
Cc: SATYANARAYANA NARLAPURAM <[email protected]>
Cc: Andrew Dunstan <[email protected]>
Cc: Nishant Sharma <[email protected]>
Cc: Mahendra Singh Thalor <[email protected]>
Cc: Fujii Masao <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: PostgreSQL Development <[email protected]>
Subject: Re: [BUG] CRASH: ECPGprepared_statement() and ECPGdeallocate_all() when connection is NULL
Date: Tue, 26 May 2026 08:34:43 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAASxf_Pd1uXYgjEJW0FftVB560_N7vK_DC6cEhv36vXea186-w@mail.gmail.com>
References: <CADrsxdbPw1ZYcuqH1-DTNhAvRN=tRTTY+_dFy8wU2g4DQb67Bg@mail.gmail.com>
<CAASxf_PtXCsmu5oCvZH4BmLdojG+0XJUH8foHFZv+2vmsSbNwA@mail.gmail.com>
<CADrsxdZMOc6qkoVcyp67+Ez8cesey3iDVaVm617oSpiDdf=5xQ@mail.gmail.com>
<CAASxf_OkeXLZy6r7f05-LjwxgHEXJymQgifU27CAvWEYfY7uVA@mail.gmail.com>
<CADrsxdZhGHj96ZYy9GR6U9yLtTshfOU-3DFd0aoz70C5S3Np5g@mail.gmail.com>
<CAASxf_O+CN9Pw+XSHCbfHE2DwS1BObAwFZnnQyT+7062ozYGQw@mail.gmail.com>
<CADrsxdb_7nCwjfoFJ3p3QvOyQtZUkDVm0aqX73bWd+27tOTO7w@mail.gmail.com>
<CAD5tBcL7rMgeykb2ZRF3t00SaWzOhtVME-fDqvspH88d+rosFw@mail.gmail.com>
<CAHg+QDe=UwWiKo6Yqc5=sUdhG=jm7jWd42yM8iGmadbnU0YNEw@mail.gmail.com>
<CAASxf_Pd1uXYgjEJW0FftVB560_N7vK_DC6cEhv36vXea186-w@mail.gmail.com>
On Mon, May 25, 2026 at 01:16:20PM +0530, Shruthi Gowda wrote:
> Thanks Satya for looking into this. However, we don't need to add the
> validation here because the caller ecpg_do_prologue*()* has already taken
> care of it. Adding it again would be redundant. What do you think?
Right, but I think that this points at a different issue: it is
wasteful to call a second time ecpg_get_connection() to get a
connection while ecpg_do_prologue() has already done a cache lookup
for the connection.
Wouldn't it be better to pass directly the connection obtained by the
first call of ecpg_get_connection() as a function argument of
ecpg_auto_prepare(), replacing the connection name? If we need the
extra init() at the end, please show if this can go wrong in the shape
of a regression test.
--
Michael
Attachments:
[application/pgp-signature] signature.asc (833B, 2-signature.asc)
download
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], [email protected], [email protected], [email protected], [email protected]
Subject: Re: [BUG] CRASH: ECPGprepared_statement() and ECPGdeallocate_all() when connection is NULL
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