public inbox for [email protected]  
help / color / mirror / Atom feed
From: Andrew Dunstan <[email protected]>
To: Tom Lane <[email protected]>
To: Alexander Lakhin <[email protected]>
Cc: Nishant Sharma <[email protected]>
Cc: Shruthi Gowda <[email protected]>
Cc: Mahendra Singh Thalor <[email protected]>
Cc: Fujii Masao <[email protected]>
Cc: PostgreSQL Development <[email protected]>
Subject: Re: [BUG] CRASH: ECPGprepared_statement() and ECPGdeallocate_all() when connection is NULL
Date: Tue, 5 May 2026 17:36:02 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CAASxf_P1F75Ck+0qyb10auT+BORupOM4yigXBnm7aWRNx1LYcA@mail.gmail.com>
	<CAASxf_OGWD7PA5TMEh2MdF2YxN8V3ByLhnFJ=uw0hKr33sgqAw@mail.gmail.com>
	<CAKYtNAqjJbzV+ZJDqA-s0fHSLen6msc=A0SfrTS1ub1KKH9haQ@mail.gmail.com>
	<CADrsxdbb2fn1LACQShrQT0bNqSCQ3hSzEojb2tODhD0PmewDiA@mail.gmail.com>
	<CAASxf_OdsJRi17EZ_ZMyQgOwUzn357YyMqJ2Z2qiExPaLRW_Lg@mail.gmail.com>
	<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>
	<75460b3c-2! [email protected]>
	<[email protected]>


On 2026-05-05 Tu 4:32 PM, Tom Lane wrote:
> Alexander Lakhin <[email protected]> writes:
>> There is no other useful information in the log, so it's not clear what's
>> wrong with that animal (no other gives us such failures), but I could
>> produce something similar (on FreeBSD and Linux) with:
>> echo "max_connections = 10" >/tmp/temp.config; TEMP_CONFIG=/tmp/temp.config gmake -s check -C src/interfaces/ecpg/test
> Yes, I can also reproduce problems with the ecpg tests at
> max_connections = 10.  For me, thread/prep segfaults but thread/alloc
> just seems to hang indefinitely.  (thread/prep sometimes does too.)
> These issues are not new; v18 does the same.  The reporting is a
> bit different but I think that's from pg_regress changes not ecpg.
>
> Looking at the postmaster log, I see
>
> 2026-05-05 16:11:06.509 EDT [682116] FATAL:  sorry, too many clients already
>
> which is unsurprising in this situation, but apparently these tests
> don't handle a connection failure well at all.
>
> There's no such message in dikkop's log, so that may be an unrelated problem.
>
> BTW, reducing max_connections to 5 causes several other tests to fail,
> but in unsurprising ways, like
>
> # +SQL error: could not connect to database "ecpg1_regression" on line 107
> # +SQL error: could not connect to database "ecpg1_regression" on line 107
> # +SQL error: could not connect to database "ecpg1_regression" on line 107
> # +SQL error: could not connect to database "ecpg1_regression" on line 107
>
>
> 			


Ugh. I will do some digging.


cheers


andrew


--
Andrew Dunstan
EDB: https://www.enterprisedb.com






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]
  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