Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wReoy-002Z3h-1W for pgsql-hackers@arkaria.postgresql.org; Mon, 25 May 2026 23:34:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wReou-002T0p-2v for pgsql-hackers@arkaria.postgresql.org; Mon, 25 May 2026 23:34:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wReou-002T0h-1t for pgsql-hackers@lists.postgresql.org; Mon, 25 May 2026 23:34:53 +0000 Received: from fout-b8-smtp.messagingengine.com ([202.12.124.151]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wReot-00000000lrO-377z for pgsql-hackers@postgresql.org; Mon, 25 May 2026 23:34:52 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id 699D31D00082; Mon, 25 May 2026 19:34:50 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Mon, 25 May 2026 19:34:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1779752090; x=1779838490; bh=aP8FZxCY/R St1nyvDC6PnFdEkJ3XJbPfr4mcQJ2NZQM=; b=KnE7cwsO2pTvnkgT5BteooiQWp 5fcWlRRYw8/amC/3sofP2lNfk9/TJCiAHlmKqTLs6E1vuMR/ReEueAPlAiPUAnc6 oVD+q5wEQY+w5mhAHesSuDp+P5B88/WMkuM8g6rc8ARxfNClkfusbl/oxOcYqXXU 6Wn6eZ5s1qf6+B2japv8bg0m6m7e7LH7RLphn4f894aSAVVB3Bj0my5aphfAe5GR oW+pAuQfSw3ym8Zqg1oq8VSl6XVbhnAJ6SwO5Aa8sGp+itetnZ6U4eLDX0mMfrtB Tsj5pi6Np64r0GCwZuO9bTqo8Ut3UDH5OTiFWOoEkso2AFnvOIKNJW6LPvuA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1779752090; x=1779838490; bh=aP8FZxCY/RSt1nyvDC6PnFdEkJ3XJbPfr4m cQJ2NZQM=; b=OQxCI/e7IwpAKjdiJ6PWJZBzotAJaIDH2IbsUltoyRWb7oALJgP cTI2DEDxWNZjxkBE6CWcLGPZPesu/B3sy4zVtt5tBBHsxVtMtkGqsJEtw6lN+ZMh lHzMS6TFwEc/OyWzqkzwyoh1KWtUG/cDy/f55x9E3PryetYB6IToA7eSeyhvmpJE gW7aGgn2I1LJYMXijYKqkCetSNB8HV2ECQaDHRBM87r8pgJYJA0006BtUa9l0pZq w7Sj1jmCO8M3D5BW1440ST830Y8+Hq+lx//MPXiGPTx4W0x1xOwG4Eai6fd5uBnD 9aDn6ejb4jGmAJQGTpJhLkHue54XVPpTEKw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTFuMd4IqG9eo0uVM7fRsRbHExhAUHZRM4DV3Yhw65SUeiW4Mh6nZb7nAkrpqfG6HC vc8L0Hi3Q5LLrBxlTf3fiGBHYGWfdqtJ8Y5p4HL+fJVXXPHFQ7xckjdvHTzqRGvpV1Apw5 TvKNIc/rMyqD4Cmyo+Ksylf/l+YNf/o9CQSKLcCTEj/EICvpnZQOrHffO5EdYdy11yl4NV OcL2PSGAavG1JTwO5SpOiILesjiYjb2kks0yf9f7VTjon5NNLXiiDBisbV8vAsNww7dhPm TORS7c6GU7bWjbJm5NoODJ7v0YKqQ/oJ43vcgU5Xn1c0zOoXDNsB/zHrkysuansG5t3YJP tj1S/vS31MkazTYEJL//wfH3D+lXKFiiUMdRnR4hN9l4in5E0reE+u0xtXp8ZEO3kS+pIL 8Ku75JPxMc2hYgiXKbmROUHGhCzX/oJexdwF/JJTX5vybdyiCpE1WNaZPPAT+cvQgSuPS5 +BEK/r/zDvQa0cqpOO2U+zoLm/vGXqA3VtrbixzQCVGRVATgr6VDgR65OjoSuTvTTvqJDb c/orz6xbEUDPb/K/jXKTD0QRlLRnx3tbaZtkvx9LPxyRJV9YaPtmKC2AUpqhxxUDMXlfsl qwHzXLw4oulDmsc7vZuq2RDgrKLrT35KGQCOlGLGwlnKJjxiBh/D/JwpoW4Q X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 25 May 2026 19:34:47 -0400 (EDT) Date: Tue, 26 May 2026 08:34:43 +0900 From: Michael Paquier To: Shruthi Gowda Cc: SATYANARAYANA NARLAPURAM , Andrew Dunstan , Nishant Sharma , Mahendra Singh Thalor , Fujii Masao , Tom Lane , PostgreSQL Development Subject: Re: [BUG] CRASH: ECPGprepared_statement() and ECPGdeallocate_all() when connection is NULL Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="2Fm2oIH7Yno7imsq" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --2Fm2oIH7Yno7imsq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --2Fm2oIH7Yno7imsq Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmoU3JMACgkQnvQgOdby QH2ySw//SU9m1fOPIGgaPhQd30jgYM+DNGqo5nxA6c/xZle5sYHpFhuZHrIXcX1R 9RMi2EuqJUWEneoWoVHJZYXTjbh1pZD9bRaNQwecrDNeigv5dAnpYMVKRhu4e3NQ QPyGFl09+c/vHklA/SZbJO5z/7Ypu0yK9pwEBFYBSVUSQQHpbOkRmCKOx6vReSby ANdNt5jR/bB/rRUEDCPFIuMAvZG2N8GtTcjuapMoy8Tmw+2ncH/YKfbp56g4M4vT b9WRxCtt9HdbHcRCJ+ZTwtijq592bYiEToogA4va9Py1Ct91eM/bhGMEAYbkYvpl bgXy4LjoJiVRjDavt1pE9tK+QdRfysOZkKlrF0fSgEHno79b/nziuzIXMGn2FqGi yyyT3Zmr4zljLOtGx/NqSJUrhs6ANt5yU6JvHKofiW6O3onSij/EJGi5n72TNpGU KoD643uP8XuNC9vZZDh//4oB1jhqtvxJ0L02f3x6fK6F4xZizpZ6xraIFTVN0kGA eQjaUB5UAyb/DFozNqY50YWBwB0fdTLE8eKLdzanUT6HwKM6iCojIJLnE6xtx0s5 fLoqZhvOEk5h0oRROSSu8JxK9hOaUOPqIUTW3dags+uMJrNtqqUBgSqZ++do5jUH B7oNKRxNL19etuWK2KqDins8enzHDaDzhE/yi8fr/Y1PlKGQNvE= =tAhx -----END PGP SIGNATURE----- --2Fm2oIH7Yno7imsq--