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 1wKMRr-000tOB-2x for pgsql-hackers@arkaria.postgresql.org; Tue, 05 May 2026 20:32:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wKMRq-00Dpry-2g for pgsql-hackers@arkaria.postgresql.org; Tue, 05 May 2026 20:32:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wKMRq-00Dprp-1j for pgsql-hackers@lists.postgresql.org; Tue, 05 May 2026 20:32:54 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wKMRo-00000000i8b-093k for pgsql-hackers@postgresql.org; Tue, 05 May 2026 20:32:54 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.18.1/8.18.1) with ESMTP id 645KWf7v699624; Tue, 5 May 2026 16:32:41 -0400 From: Tom Lane To: Alexander Lakhin cc: Andrew Dunstan , Nishant Sharma , Shruthi Gowda , Mahendra Singh Thalor , Fujii Masao , PostgreSQL Development Subject: Re: [BUG] CRASH: ECPGprepared_statement() and ECPGdeallocate_all() when connection is NULL In-reply-to: <75460b3c-255d-47eb-b889-d99de38e6758@gmail.com> References: <75460b3c-2! 55d-47eb-b889-d99de38e6758@gmail.com> Comments: In-reply-to Alexander Lakhin message dated "Tue, 05 May 2026 23:00:00 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <699622.1778013161.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 05 May 2026 16:32:41 -0400 Message-ID: <699623.1778013161@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alexander Lakhin 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 =3D 10" >/tmp/temp.config; TEMP_CONFIG=3D/tmp/temp= .config gmake -s check -C src/interfaces/ecpg/test Yes, I can also reproduce problems with the ecpg tests at max_connections =3D 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 alrea= dy 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 probl= em. 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 regards, tom lane