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.94.2) (envelope-from ) id 1s1JIF-00BAk8-TQ for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Apr 2024 05:11:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1s1JID-00FAtg-Fk for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Apr 2024 05:11:10 +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.94.2) (envelope-from ) id 1s1JID-00FAtY-2E for pgsql-hackers@lists.postgresql.org; Mon, 29 Apr 2024 05:11:09 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s1JI7-000YN9-S1 for pgsql-hackers@postgresql.org; Mon, 29 Apr 2024 05:11:08 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 43T5B0Tw1068978; Mon, 29 Apr 2024 01:11:00 -0400 From: Tom Lane To: Michael Paquier cc: Richard Guo , PostgreSQL-development Subject: Re: A failure in prepared_xacts test In-reply-to: References: Comments: In-reply-to Michael Paquier message dated "Mon, 29 Apr 2024 13:58:51 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1068976.1714367460.1@sss.pgh.pa.us> Date: Mon, 29 Apr 2024 01:11:00 -0400 Message-ID: <1068977.1714367460@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michael Paquier writes: > If you grep the source tree, you'd notice that a prepared transaction > named gxid only exists in the 2PC tests of ECPG, in > src/interfaces/ecpg/test/sql/twophase.pgc. So the origin of the > failure comes from a race condition due to test parallelization, > because the scan of pg_prepared_xacts affects all databases with > installcheck, and in your case it means that the scan of > pg_prepared_xacts was running in parallel of the ECPG tests with an > installcheck. Up to now, we've only worried about whether tests running in parallel within a single test suite can interact. It's quite scary to think that the meson setup has expanded the possibility of interactions to our entire source tree. Maybe that was a bad idea and we should fix the meson infrastructure to not do that. I fear that otherwise, we'll get bit regularly by very-low-probability bugs of this kind. regards, tom lane