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 1u21HC-00Bi5G-Fa for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Apr 2025 05:13:34 +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 1u21HA-005pdi-E8 for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Apr 2025 05:13:32 +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 1u21HA-005pdZ-4a for pgsql-hackers@lists.postgresql.org; Tue, 08 Apr 2025 05:13:32 +0000 Received: from fout-a3-smtp.messagingengine.com ([103.168.172.146]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u21H8-003bo5-1y for pgsql-hackers@lists.postgresql.org; Tue, 08 Apr 2025 05:13:31 +0000 Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfout.phl.internal (Postfix) with ESMTP id 85384138015A; Tue, 8 Apr 2025 01:13:29 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-08.internal (MEProxy); Tue, 08 Apr 2025 01:13:29 -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=fm2; t=1744089209; x=1744175609; bh=xgWZrG3HYH BdwCuRUhsOlPfsZr1puQ0y0k6A0p7ynQE=; b=hB/I+78+1tJURxPOWezWycQi6z 8UrP+7VaMSS54XpAmKOmcUXCJYE4p882hMI74R2grhxIXgih1UIAHlZ/or+GL6cm FxMQvL2y+rRqJUN9wm6cZnumZj7p9k8oVQGxLLXGquanWvR1D/ee4fRfc2RY5x7t tohPH1yVhoIzvWYqZ3cLAoe+kBVOsPXIm2g9nC0amrbi1Mu4KGEmQ4iwEmEeETh4 8ghaPXrbvFXxef/xreZZHC3OdkSH+WRF9fzY63P6SHTeJtcCO0Hdj1GWv2R0nabM 4EvvCiQqHf1QLoaMdrBrL1l20JsYya+fZWP/maAdW0fBgGMsmyR6lqvARo1g== 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=fm2; t= 1744089209; x=1744175609; bh=xgWZrG3HYHBdwCuRUhsOlPfsZr1puQ0y0k6 A0p7ynQE=; b=A6wNsp7YhvQl6jjApI1ysSg4k1835vpZ1h7uoJjxnU+eJYRv/L6 ePOfSZNGOtl/yA9bSrazLQ+o2PXHKgH2WWPQ2UUGsbB2huv0Z6jK/psWuQ928712 YSD6P69+ijnJmkuECQqcDHU2tVPAPl2eBXyu8mDlkGnqyo0X6t+w3EeOu85ziYBi ASm5jaAYgz0k37FuJw3HvR5YOXrOaMcWghNipv06C/qUTEEzePAhJjOLNhK0xFEg fgFcFcbKurj/7SPpYaAqBfP6hxNI0hc429tWCftzp0sveFZgWhhbuDTqTFloLWdd +wpuBjuCWaMbt3HWmVV7kBwiKu/tq4aGD7w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvtddvvddvucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnegfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefu kfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivg hruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhep teelieefudffhffhtdetleeggeegfffhkeeuveetiefgudduvedutefggeeivdejnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggv lhesphgrqhhuihgvrhdrgiihiidpnhgspghrtghpthhtohepgedpmhhouggvpehsmhhtph houhhtpdhrtghpthhtohepkhhurhhouggrrdhhrgihrghtohesfhhujhhithhsuhdrtgho mhdprhgtphhtthhopegrmhhithdrkhgrphhilhgrudeisehgmhgrihhlrdgtohhmpdhrtg hpthhtohepsggvrhhtrhgrnhguughrohhuvhhothdrphhgsehgmhgrihhlrdgtohhmpdhr tghpthhtohepphhgshhqlhdqhhgrtghkvghrsheslhhishhtshdrphhoshhtghhrvghsqh hlrdhorhhg X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 8 Apr 2025 01:13:27 -0400 (EDT) Date: Tue, 8 Apr 2025 14:13:20 +0900 From: Michael Paquier To: "Hayato Kuroda (Fujitsu)" Cc: 'Amit Kapila' , Bertrand Drouvot , "pgsql-hackers@lists.postgresql.org" Subject: Re: Fix 035_standby_logical_decoding.pl race conditions Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="eJsYljpsSCzg3rJz" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --eJsYljpsSCzg3rJz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 08, 2025 at 02:00:35AM +0000, Hayato Kuroda (Fujitsu) wrote: > Your patch looks good to me and it could pass on my env. PSA patches for = PG16. > Patch for PG17 is not changed, just renamed. @@ -1287,6 +1288,17 @@ LogStandbySnapshot(void) =20 Assert(XLogStandbyInfoActive()); =20 +#ifdef USE_INJECTION_POINTS + if (IS_INJECTION_POINT_ATTACHED("skip-log-running-xacts")) + { + /* + * This record could move slot's xmin forward during decoding, lea= ding + * to unpredictable results, so skip it when requested by the test. + */ + return GetInsertRecPtr(); + } +#endif I have unfortunately not been able to pay much attention to this thread, but using an injection point as a trick to disable the generation of these random standby snapshot records is an interesting approach to stabilize the test, and it should make it faster as well. Nice. -- Michael --eJsYljpsSCzg3rJz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmf0sHAACgkQnvQgOdby QH185g//Rt41y1LuDtOb1Rn3tdU/WAX6ep79edLj/R089GfM9bAbvg6cMm3RjlPP F+2aEjjT1FQPqEYqnFZItdpKdOfxFUZBDvil5xweG0q5wTjLY/a+zZQ2selP5Vg/ NWw3A4Q/6l6YJKqrNMt+dUJWuGqJjpRuJOBjxk9bmgOdmmvu6fU6eM3J1GWY40tq E37A1O+Wbzzib7GOm1c04BxgVWPXJ48ERFVRcu/BZAKWXgLUOU+tOzkfTsci8X95 mnXf7GXw9cK5PWsDtmg7BIuWCQol0tlpVBvtET85fPPGRI/sgRju0x4QsCu+tD11 ZtwPfDuANJqtSfSxCGKbRjiViI0MghRuxu9DB1QnbVdXCWwemTvz9F2acIXDrf2r AeY7qCIKOiiowlC79E9+P4q56Ds3vCyBuV7LDBhhhRFPf7ylFRxtKj0pYvKR5s0A 7MR0N+aSsMgGiOg9urPzIRMofTUe7EqFAAT3FF1OkaqtLK/ThTlkklF4H9F5AW+b Zg9iUg1WgPVbpH57mRMv+KDdiJ6H7WQxmvfOg8/WUAvcB1c55GUtgFkomfL8a46U N1EeWpeQhVDvmYxFyJn1VqzLpFHMeH/YQ3myM2KTOEzk1abbSrUowsZ9kieLgKiK rTXljrbNAcw4MYp3Wh72XX2PBWG6AyNBnjIAsXG62q6WcZ/e/E0= =veae -----END PGP SIGNATURE----- --eJsYljpsSCzg3rJz--