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 1wXU0r-003I4M-08 for pgsql-hackers@arkaria.postgresql.org; Thu, 11 Jun 2026 01:15:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wXU0o-00DkOE-2N for pgsql-hackers@arkaria.postgresql.org; Thu, 11 Jun 2026 01:15:14 +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 1wXU0n-00DkO4-2j for pgsql-hackers@lists.postgresql.org; Thu, 11 Jun 2026 01:15:14 +0000 Received: from fout-a4-smtp.messagingengine.com ([103.168.172.147]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wXU0i-000000026Iv-3try for pgsql-hackers@postgresql.org; Thu, 11 Jun 2026 01:15:12 +0000 Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfout.phl.internal (Postfix) with ESMTP id 4E4ACEC003D; Wed, 10 Jun 2026 21:15:07 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Wed, 10 Jun 2026 21:15:07 -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=fm1; t=1781140507; x=1781226907; bh=vtmDkP3dKy 4z2Lv/s+HwzmBcXgnRAfGJ2iMRwIf8H/8=; b=o6QW59VrN7nM/O6w/gPn6iYM1f dHuV5+iE8GwTMLxFz6vRyA8h7mUXMAw+PxxKAp2slpD8P0gBDOdSlfxbmbfeVcdI M/jiAjQYl9fkqydjYdRySSNVglNUgEzHVN0E6/skOe2GsRHsAjvMqbkXEnujmbp6 U5SaFpgizXAphbCqLjfbDZob41YFg36Hb8hi00f9M/dLlug/a/I5asDj9TSDRZYO b8cOxGFTEoOicl9NOS25YCLUetqYMtVwmpxIKx73ctRKXSFo/wtUH36T6uaZFhu7 51NPHsfsF2fFZhrWSFQB7JaJ8sMeWZ4HWYLktU3QNF6hE+1f0WCADkvqUraw== 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=fm1; t= 1781140507; x=1781226907; bh=vtmDkP3dKy4z2Lv/s+HwzmBcXgnRAfGJ2iM RwIf8H/8=; b=MBh4bhp5hl+nVe+S2ZBEu+VzQShPAQ4VTSHB6p/sAoCKWjRVADT fdf0ytlNqSe1O4FXF+inlghfMllwSSQVDoJNTspfZjdo78+JKuE/emdGvdxxunor E+GAk4/iOWT2XKE14SOHsB3TUAUtHAPgZ/KFFGQ8RwyhfkrcfEYd04nyy2L6x0AA WlSGYm4D+eHSPgu+hrVw9vsU7QDY7sz3YiFhEdihnchgni0WEvHKNGl2ojV5x0Hq Nw+nKYmH91ft78z/2tcbX2Qd50H+q3p6coSALFjMHM8HuGa9JrG0BOSAnu0xYzyR Y7dzobD+7k0J1seXOGXJ0OoxRlFpi7ZwzRQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTGq1QM0prQzPnwFAbFz1vOJ4C4mJknEfACkbSWfTN3xFFLtDCP9/LxKPxpnk8MPTW BeMtgj8K6DdW7STNCYAkdAFJHPIHFR4P2Xk0zT4VcFSxmDH+p3O7+k35yu6V0Cw1bpZI/w hTER8XGGoXKgQICJtEGssbmWkM4N6mrXsGDmyplA1JgnQH6GP+poiTPUfuljX+BYPjKhXU MVyXkT+N2gjfwVtYO8IFFKmmpdkm490I+o9YYQVWFRc9jvVO26ak2Zh237EKNp8n8/unFA 47Qx76972yJidL+aJDDCmkR4I30U3IZEyeZJl67oEKN/ReMemJJwVuwVxWen7e6kopW0gW hPaK2F5Or06YLEYk/Ir0+fkXv3ao93iSZ+WsXwP+rkqH9+jGfw1Cq1N9bNuPSNWOZu894O Ck8+JUa/F62/5ityHlQGbLScrGnjwl62kVr6NY9rldevx1pFwhad+DPGNLj+EnzvdbgUEs 6bcoaY6HLgJ4udGUNKW3Eb2LpJAi/Glw9n1qSwgT6uI2xC1GbsMkoQl9KsOifUcirp4iiK huVmF4GUyPZhALoJSLrThxl4ncKl4YuTo8bsBUkYUDBu2ZnBjjd447y0A4QfJvLXb5lYm0 99V3mq3VmzBG4lDiXCXqFCyOlf+qvP5mWeFfu8WTmC0CzkbVRIJ8QzGi+xYw X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 10 Jun 2026 21:15:05 -0400 (EDT) Date: Thu, 11 Jun 2026 10:15:01 +0900 From: Michael Paquier To: Bertrand Drouvot Cc: Xuneng Zhou , "Hayato Kuroda (Fujitsu)" , Alexander Lakhin , pgsql-hackers Subject: Re: t/035_standby_logical_decoding.pl might fail on attempt to read wrong timeline Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="NLQa8WhYOPx2iTsi" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --NLQa8WhYOPx2iTsi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 10, 2026 at 05:28:00PM +0000, Bertrand Drouvot wrote: > On Wed, Jun 10, 2026 at 04:36:14PM +0800, Xuneng Zhou wrote: >> The >> essential thing is just to ensure that the startup remains paused >> until decoding output is observed. >=20 > Right, thanks for confirming. That's exactly what v2 is doing. I have looked at this thread, and my first impression was that this could be a data integrity issue while decoding changes due to the transient errors one could see across the promotion requests. But it's less severe than I thought initially: we have an availability problem here, down to v16, with a correct recovery possible once the promotion request has completed. That could be indeed surprising for users that have HA setups with standbys doing logical decoding.. The SQL function path is less worrying to me, there are as far as I know few users of it compared to the "native" path with sync workers. read_local_xlog_page_guts() does not only impact SQL-callable logirep functions, even it is the spot that should be hit most of the time (again, the RecoveryInProgress() vs promotion window is super narrow). At quick glance, things are:=20 - walinspect. - Slot advance. - Slot creation (?), but it feels even narrower. With two items dealt with on this thread for these two callback paths changed, moving on the part related to physical replication into its own thread would be better. This requires an entirely different analysis and a different lookup. The backpatch of PG16 is straight-forward and adding GetWALInsertionTimeLineIfSet() down there does not look like an issue. Not having any tests in v16 feels sad, but that's life. It does not prevent addressing the availability issue on this branch. I'll go take it up from here. -- Michael --NLQa8WhYOPx2iTsi Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmoqDBQACgkQnvQgOdby QH03EQ//U+2CHzSr9npXsYpoFsCSvWnsw5AAhBGbjvlAcdb5/Z+jPnckN7slItmQ FhH5Bs73ILlchOy8hSqlgkvNIcMXq39AjoXIL+QkaxfaGjHSgq2mP/v0CgOFiD37 hqKv6OTPhSzheU2YSOcB2JyIv8PGkLFPMigc0IBEtcX6Y66DPgQ+6M//yIEJ57jE 1ijcJolnPzXY+zsrlrusjCG60aZCYL2MqnIJIx7dGCRRoTa8cRg1pvUaOedJOK5X LhZt8QKKwWeF79+YZ5NbM3rybqWzN8EiLzU+kMHSrNItD1Dh++84X2F4SY1oXpNG Ks3uPt2RxEkJeWrAS1Zddx8rKvcPWB964C6OmymZLxN4LN/7PpE6v/GosSMSMNa8 WigOKpfcegGM/ZtjKa65QKcXvFhnecF99YvLGDznfUqJl8yCxzgQgvwfTtpAw8xT hMlxElKhEPP2SRGoyoeKQXfeRvTyT3eQNydpiQE3UZ0z/1MmfiGYGKZ2hHuxcIV+ eUfhD9p/7sJHJ+g5pfR5mXCKoc/Pe5GT9G7f9/4dhqWm51CP1BjdudOU/ic/CZ9U r5/L4/vLUAmPw9bb/uj8U3y8pJp+6MUaAocWd0AujAafTRE3FQdP2kYVbslAo2dV tvK2bNW5QnXZQ3Ilpmc1JNsMxLm9teR6FMaX56Z+r05RMBhe+8s= =g0Mg -----END PGP SIGNATURE----- --NLQa8WhYOPx2iTsi--