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 1wWpTR-002sp4-1g for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Jun 2026 05:58:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wWpTP-0059zj-2f for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Jun 2026 05:58:03 +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 1wWpTP-0059za-1R for pgsql-hackers@lists.postgresql.org; Tue, 09 Jun 2026 05:58:03 +0000 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wWpTN-00000001nkf-1R0P for pgsql-hackers@postgresql.org; Tue, 09 Jun 2026 05:58:02 +0000 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-490be03d47bso43201125e9.0 for ; Mon, 08 Jun 2026 22:58:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780984678; x=1781589478; 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=ujVZzIBoTQX0+veUW+jZjj89lwQQKcj/731kj9PHm5o=; b=SOfRMwNY3peWMuIpO/5fdAw3VUw4+Us9BEdCs7FA4RbF2pvXTCxhF9Vqtv3fH/Qbgz Bq1JszSQVBRRuGX5hNjzipHTOkhT6uaeQkGUW4JR1GHjAogQJK+joDCAhvvQqP6hdL4g mHaxutjK9dRcwnvuzXh7XIq/k5YTni+ULW/3MkB/hcERR749ePMsREbt+vb+VfdUh64g aiYUMAKMZC6X35NB5wqrK4p0mNBPT2vclC1ZdWp9+Jg3o82GcXjoOYF2X/5v4DmqSnVY mdtatV2U1VnF0k1nCWYKLhkChdA/4tiKHZHY4llAOduZOYkIopnRztKLXnB8FTgPByJf HhSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780984678; x=1781589478; 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=ujVZzIBoTQX0+veUW+jZjj89lwQQKcj/731kj9PHm5o=; b=piFHfMSz9j2TeMGunH1DRKnJ67ZbKJHz8cy2s+7K/etrZ/6DjKrDrDQUi+M245L73k 6Cdel8ZywTdYmGDM29fdZAxbOwI8gpXMbMvp+hS3RAePVO9QXeWOiDoD1uxcXs11B6Hx DzYdTOnonFPLfx1E+Q12a7leQCDja0TfFNEEFU67KLgkxrVdYyfU2hjowigotruNMJlo YJTbpLof4OAWiNHtozPp8RJK0R8diuAXdF21YcoxMs8OO2gQPk46Clv/3RScAOTygfCj hWsXqfxN+aUmI+V7+d1v9U8tpFs2Y4k3MDBDXh8jWCDu87OMaqxyajeVHf8LA2Z1qv6R eFNg== X-Forwarded-Encrypted: i=1; AFNElJ/Ai3wz7dxEMXC+iZJyN9utB9GHHDkIQWuU+Pj7IIpTlSxDiXl0u8LFiYKo8EijjQe5/YOtFJCocYiZS/JB@postgresql.org X-Gm-Message-State: AOJu0YwZ5bwaIRTP2kc5SqjNz8GhZidHH1408PPczxxnMgVDPo+0JFMP FLkHENoda/3cLpwwgNgj1fkHcsP5+MSFbjV1liprdkgxFI8i9vjrKzCL X-Gm-Gg: Acq92OEx9ncm0MROaSuVueHausXWJ+rWbB/kX33h9Ui7CRADYidShSC7R3zL1VhN991 acuNi9QxRF/0OqjGUCmkgeds372wciJHvmZKMa1mYeAh7feZd4bPLQw0qdJ6eIGB4OLD5+rYTfP 6OXY2T03dhXzvethXcs/tpb53kzZVbgTHy8lZvw52rCm9+DMUc5oNculcm0Zo4HiUiO8CdEnFlh ueSon1KIHnhQPJIE7aX0mGf9jFbYgFWJ1CsFDdz9ZEp8MgaWMV14GBP8Ai8zuLFC3zs/skscooZ p7w2lbDI6zgoatHZ+UwPld4nbQiZTfXnG/6rDcu3KMpcG4334ZdFUwx4928JRuWc+5bGKbnUWNe nGH8fg6h3m9Q6N3D+gnug8g8PtyXqvdco5NUBa9SPlPcy8vij31NlTCfO5xkTnp0q1fCItfy1Zr 2gdC4edBmyglHj5YHm3P/A4W+xMqfMOeIRYpVFv/0hnQ+BVutADicS88HVDhoSudKfMTWSXfcF6 mfBwWqbCaOH9l2AE2lx3Q== X-Received: by 2002:a05:600d:8494:10b0:490:c2a3:3304 with SMTP id 5b1f17b1804b1-490c2a333c7mr194576765e9.35.1780984677968; Mon, 08 Jun 2026 22:57:57 -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 ffacd0b85a97d-4601f2ed944sm60536187f8f.13.2026.06.08.22.57.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jun 2026 22:57:57 -0700 (PDT) Date: Tue, 9 Jun 2026 05:57:56 +0000 From: Bertrand Drouvot To: "Hayato Kuroda (Fujitsu)" Cc: Alexander Lakhin , "xunengzhou@gmail.com" , 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 Hayato-san, On Tue, Jun 09, 2026 at 04:04:20AM +0000, Hayato Kuroda (Fujitsu) wrote: > Dear Bertrand, Xuneng, > > Thanks for sharing the reproducer and opinion. I could now understand. > > While seeing, I felt the same issue can happen even for the streaming case. > Please see attached reproducer and possible fix. I just had a quick look and I feel that's probably an issue too (good find!). I think that your fix should use GetWALInsertionTimeLineIfSet() though (but I only did a quick scan on your patch). > Can you also include that point? Or this thread discusses only for the logical case? > If separated, I can take initiative for the streaming part, after the logical decoding > case. I would says it's probably better to keep this thread focusing on Alexander's issue (logical decoding). Once this thread is fixed, then I'd suggest to open a dedicated thread for the streaming one (mentioning this thread and probably trying to mimic its fix as close as possible). Also I would suggest not to post "real" patches here as they conflict with mine in the cfbot (means the cfbot won't tell me anymore if my patches need a rebase). Please use .txt files or use "nocfbot" instead if you feel the need. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com