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 1wWb3t-002j6k-38 for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Jun 2026 14:34:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wWb3s-002jB9-1a for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Jun 2026 14:34:44 +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 1wWb3s-002jB1-0e for pgsql-hackers@lists.postgresql.org; Mon, 08 Jun 2026 14:34:44 +0000 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wWb3p-00000001z8G-35nd for pgsql-hackers@postgresql.org; Mon, 08 Jun 2026 14:34:43 +0000 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-bef47b1ac01so663989966b.2 for ; Mon, 08 Jun 2026 07:34:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1780929280; cv=none; d=google.com; s=arc-20240605; b=ltn/jUliTVPp5bwIRhXgVG4jen/Q55k110KVbCh528sD2k4u1I/IYGoHDsyIPLnWcB 170rrkNBTIGvREHZcal+Ziaqu2sVVK8DZFKWfT9r+JcATQ1don44uip360J4KQa2awZs VFkcMZ3hwNR27feZC1EVgzj6G7KeAa4VO4a/8rO/4dsos96n28PvUDlfBW4NgAPKRIjr lC+NHrJornZaVrCov3kACEoSYIZm3JS403mz0tXP365ijW8eJJZ1a61Vsn5+B3ZK/wNj jeDNcrsppbSEA/G2Yud1Db2DJ7665bBf9KrTSk1nUJ/vglE0aggP1TstSwcbV/bI4jlg 5IZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=LVJCN1EIhlJ0oydE4Bw4j5rtEDuh/QO6aD8Lhc4J2NU=; fh=zXDU921po0YykK7YPNenyB1Bpl/e1H45H6zyv7ktGjo=; b=b2ngy5T6nbJRn39wDlpgbPK/CuPlYtC8NzoXoz+L3FrLlQ2cOJqIvgX89My7SbB9GF 12lYXn9byivOFE6Fg0tK91NtQT9Y4rrGgUYgHFaUKcXWcYhfYJnVh2SEigQTdLcm4+w5 BWln+nbEzXglfZgtxtxm9vEX3bWmzw+SyGG7xckvIK7VQMcpngK5XdKs/nfTZfey7QLn adrgRC9UbJZKjrRJoSEsOvLS8tPMwxSbPpjpWUUlVI7hWUsdPX9JsVdomLJ77GDSFCMD WZuF4nCQ8I3SwLa2IiBMJQGpf9I3KG+l6MnuN7gqPsb4gaUiVLTxoIE5LbliaD/1g1hz mx+A==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780929280; x=1781534080; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=LVJCN1EIhlJ0oydE4Bw4j5rtEDuh/QO6aD8Lhc4J2NU=; b=SWnte5nxjHWGIy0hcp/o+iRge+yS4G3NjYbuFzKQkWMqepejQnU2KPVkmteka9zmQL mg7XXWsLslu5JDxd2kWujzo+xH/VLredtlr96SC26fVxTBotC0aLgOEjbQ/x7DQ//zN2 woT2eKVOY3nUfO6zTgNl8pLOS2CEt6Xx55JY9k1IqZcnN07eo0ChAWvfqRtxyJ0G1Aan c81grXXbl6bZL2HvtrW0ABgvxAAfK+nSNWuIDNg9H/p1vehh2dOjlm85uug7XqQBYbMw CSDUmu544CBzm2ZNWke4hU4dkIbyOBSaHjx7SnU0OHOsqH5Vrdvl8VHkYYWjg4YOCeBt 91kQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780929280; x=1781534080; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=LVJCN1EIhlJ0oydE4Bw4j5rtEDuh/QO6aD8Lhc4J2NU=; b=cNYjobRPlWnQHe6/VH0Bys4OtA2WUi3DXdQ8M/BmxZXMdtIn9BbU5OMVjQUdE4XHA6 Q6seeS1dOyzJ8uumcFOyv4q3ghaw9lbY8Q+twVIgnDQceWNNLFAxE6sS7XKAmhUcAsnc VKsDPiSl3FUDwgwtvnPpItzKbYAsJuPmv+h7XPJEE8hOsdJRAeOd6+wDjQqHOuNBbIut yhPfBuGOrF+UxTwXnZc0OzR1Tf4kKtqbNhiN369Op57YeyRFNCYuEIYfQa1UUcYNXQVr GRvcYVDqw8vi7VPlFgPG1hRmIeepPjf1Rof+vi7MDTdddhB2XDY6U38FPs4ohab47grs ZiTQ== X-Forwarded-Encrypted: i=1; AFNElJ8I3Uo7hiVe07nlnvX8VwKPxkpSPL+jLYayez3VVnoMUhgcEteg+ehCSMlAEobjhpeHKxzdD/6JdHjMz88e@postgresql.org X-Gm-Message-State: AOJu0YyM9K36ktkF4m81pu+5MZ+LPjIPLlMXRkJuojYulZVBBXkwOAP+ UwP5uAMQvTXloQy8JEg4QLy9ieuirVEf0V1jc3xzYTC2fdAJGd1/BC9nsjzh83z1ZGJZN4kPqYB 1Uk3zXI2srCMuYge3CUth7BDFAuy1gkU= X-Gm-Gg: Acq92OHrhF/xEwrmLhWgni8ux6X0VI0Kodie4jh+cu/5ImB41AaDXG08NWw7C5A6dxy 6gJNzFT8g68Rkz1g/KkR9Jssr2Lfp0Yl1bXIpyjUhon/Di2GTcL0j4VGmITJHvtDohKJueZ8CaB fgugm64v/6uJXqmkPe2G+aYl6M2uNNZ8gJtXOuuRP2R2+MM1IOJe/MKNTm/hpL++CRDutIHb1ab dfzdPBm5edYZ8iDRkjPTyiCpL7iHC5d3qt6ik5aCFYmgmf7xW51A2m4sG2VxqEtS1Dsc8P1Ath/ HEc6gNX2UUVyD79MGGPWPmiIyy9W+wPElMZj94WImUi1dOwrGqNM6Mf4eSa46mL3G0sPPk8sMvk pisFhGaR26Pe7wa71dXQgi4KuFu7+ygsCknWR4sFO13rbH9TAS8A= X-Received: by 2002:a17:907:ca1:b0:bf4:6aca:6ff1 with SMTP id a640c23a62f3a-bf46aca72d8mr378377966b.49.1780929279956; Mon, 08 Jun 2026 07:34:39 -0700 (PDT) MIME-Version: 1.0 References: <7daef094-abf3-4672-bc23-3df4763b16a3@gmail.com> In-Reply-To: From: Xuneng Zhou Date: Mon, 8 Jun 2026 22:34:27 +0800 X-Gm-Features: AVVi8CfFntu3g2STqnsb_H6p2SvaRs9ai7z3oFeSxQG7Tf6ptWONl-6PdaJNRPs Message-ID: Subject: Re: t/035_standby_logical_decoding.pl might fail on attempt to read wrong timeline To: Bertrand Drouvot Cc: "Hayato Kuroda (Fujitsu)" , Alexander Lakhin , pgsql-hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Jun 8, 2026 at 10:22=E2=80=AFPM Bertrand Drouvot wrote: > > Hi, > > On Mon, Jun 08, 2026 at 09:00:17PM +0800, Xuneng Zhou wrote: > > I tweaked the reproducer based on the theory outlined above. The main > > changes from the original reproducer are: > > > > 1) blocks at logical-walsender-after-slot-acquire in walsender.c, > > before the decoding context is created and before the reader starts > > from restart_lsn, matching the delay set by Alexander > > > 2) Forces the first read to occur during promotion. It inserts rows > > 1..4, waits for replay, starts promotion with pg_promote(false), holds > > startup at startup-logical-decoding-status-change-end-of-recovery, > > then wakes the walsender. > > Yeah, so this existing startup-logical-decoding-status-change-end-of-reco= very > injection point already exists in the code tree and is also called after > CleanupAfterArchiveRecovery() and before RECOVERY_STATE_DONE change in > StartupXLOG(). > > So this is the same window as the new injection point that was added in t= he new > tests in v1-0002 shared up-thread [1]. > > That said, I think I prefer the v1-0002 shared up-thread [1] approach for= the > tests as: > > - the injection point name clearly describes the tested condition > - no new injection point is added in walsender.c (it pauses startup mid-p= romotion > and lets the walsender connect) > - the test relies on one injection point (not two) > > [1]: https://postgr.es/m/aiaBtENl7tTf2MM8%40bdtpg > Thanks for the clarification. I haven't reviewed the patch set other than applying the patch 1 yet, but I plan to do so tomorrow. --=20 Regards, Xuneng Zhou HighGo Software Co., Ltd.