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 1wWari-002izH-1d for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Jun 2026 14:22:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wWarg-002h4J-1F for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Jun 2026 14:22:08 +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 1wWarf-002h4B-36 for pgsql-hackers@lists.postgresql.org; Mon, 08 Jun 2026 14:22:08 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wWard-00000001z0p-08OX for pgsql-hackers@postgresql.org; Mon, 08 Jun 2026 14:22:07 +0000 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-490b43e2b95so35480535e9.0 for ; Mon, 08 Jun 2026 07:22:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780928521; x=1781533321; darn=postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Inamon7TQi/g1h2/W2bY0uzoXRrQHy+9mskHWSZkBV0=; b=ZClwDYF7DLiaywPwEUDxOsS695XOCoRka1n7U64CZN6OS3jFW2LlohbiC3T55xNoVB 5RRhaDY1DMtAOvKjHQNh2pk5aA04Qd+PLRxQtwCjs4NonBe7tOAzdiW1M5qFIHNJjgI5 f8FKy75m/pzXG2ISFb8iRlL+t6EtmG/fpNtYvAbszkVYBT3/96aJl3oJWyAPvLaZWXGB ziM3vlQDFCYSXQj7dq5hFPpRnuCfX5ow5kOOrnR+DCGi9/iMp4HEcS5mkl80fMK9eaV8 4vgPjifl2lOPo0v484aoQcxa2IA0y0NBuhT70SPYPQlx1SGc2WnlWZ9Lty3YQvOqDCQF UMvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780928521; x=1781533321; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Inamon7TQi/g1h2/W2bY0uzoXRrQHy+9mskHWSZkBV0=; b=KNUanF2ECEWskGTzW9Eb7RtkvgWIeReRP4RJhKBMuGAFnyuOYsIIAfCKLL0ZD/xw8l tqAi2Er/Uc7b71SkubYHbqUZMxAkmo7XIu8pOO6v4dSdRKBZUCJ3EbFG2OMY4B05iN3t d0fTJnxDHCqhyroJFmNwIQzHcFDncfYUNg2MhopSvkrKbbb6vDd+B10c9xZ9kCa6kvhW /RYyJfO39pHnWZnnwKemSthK3iY3ii791tyGVKoizG8uulo6RDhRHKdzTyvh/Pdqr6TK kHyoKdZvFyRIgUdNdfNDzhqDdVsLKrn+WrjdrSuOCM1Vzm9/kpv9Uk6C/9jOc38eaj2z 3P8w== X-Forwarded-Encrypted: i=1; AFNElJ+OfbMU/6hwS1a88qenAT33gavmiaTatJodbaNB8JEcGqUM5SWU5OaOvFn+bOv77f8mTXUAYeagG/fefNxf@postgresql.org X-Gm-Message-State: AOJu0YyXZM7kTp5NboQ0ElkAjIr9GEJVTc52/Vhs0bfkNbLnGfQhoOLh KLRHXSSDra+UXpcKXseDa/WM2bAlzcT0Dw/iGM5BJxrdUwtKPNGkqwQf X-Gm-Gg: Acq92OEL/O2PMgniKDwnf9MDoOb8xcPR969ug2q4PzLKaeEWavyLWiXvgmn+WrdsZp1 xAUNXHEqJuqJ6xSVzANt8iRNMpedqd0Acu7xEbg8p7Sjx57Eac209WstUJZd1MNv1q37GJpndFx ko3byjxJwG7JXo74EHA22LeabLgxHP6Do+ZlAX5XU7EGcUtSWo/wACbtl8NIGfvvYVHWRX5ap4h qYHFuKTkqRC/hAHdNzO62e/rE0HIiao+j5LJv5GpE/Lbq48eGkE8FD7pwEJRa3C5wiiJU8L8o9Q QAwuc76au/htGjIrOiDizZ2qaHHs1749fFYB8NgzT4S4fTyRgQxgQwisLuyXgCOOqnhE6oMLI6e Oz7B3/sq8ENkjkA/dKKFHA84sfmj/WmVh50SVmlDwTuI2QYnevF9tovf2/nAwiHwYcMO0jit9TL fvhLTabqqyuGTc5GF9NKkaGwY+fGF+fVDr4hw7SDGPQBWVqv4zePkD1MQy3rA/g8pqkQZdqQi5H ++sM+WoS6F3t6BGE3Vq8A== X-Received: by 2002:a05:600c:35d4:b0:490:b8d3:5dcc with SMTP id 5b1f17b1804b1-490c25e4634mr269276915e9.19.1780928520710; Mon, 08 Jun 2026 07:22:00 -0700 (PDT) Received: from bdtpg (ec2-15-237-197-144.eu-west-3.compute.amazonaws.com. [15.237.197.144]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-490bc39def5sm387706245e9.5.2026.06.08.07.22.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jun 2026 07:22:00 -0700 (PDT) Date: Mon, 8 Jun 2026 14:21:59 +0000 From: Bertrand Drouvot To: Xuneng Zhou Cc: "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: <7daef094-abf3-4672-bc23-3df4763b16a3@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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-recovery 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 the 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-promotion and lets the walsender connect) - the test relies on one injection point (not two) [1]: https://postgr.es/m/aiaBtENl7tTf2MM8%40bdtpg Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com