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.98.2) (envelope-from ) id 1xLzEA-00000001nK8-0i1u for pgsql-bugs@arkaria.postgresql.org; Wed, 28 Oct 2026 08:41:46 +0000 Received: from localhost ([127.0.0.1]:53590 helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xLzE9-0000000ElJc-2eML for pgsql-bugs@arkaria.postgresql.org; Wed, 28 Oct 2026 08:41:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]:39994) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xLzE9-0000000ElJT-1X8j for pgsql-bugs@lists.postgresql.org; Wed, 28 Oct 2026 08:41:45 +0000 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1xLzE7-00000001O7t-0C0C for pgsql-bugs@lists.postgresql.org; Wed, 28 Oct 2026 08:41:45 +0000 Received: by mail-pg1-x52b.google.com with SMTP id 41be03b00d2f7-cc4aa18f9afso352828a12.3 for ; Wed, 28 Oct 2026 01:41:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793176901; x=1793781701; darn=lists.postgresql.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:content-type:from:to:cc :subject:date:message-id:reply-to:content-type; bh=XZ/fpSRzvi8McKRzJ+1VtbdqtbDWzEzTV6x3Fj8pdM8=; b=Yx/7NELIGzP3SF19MWl8kqPUXsOIyZnRSdh3o7xMmFlcySowzEqoJnBN6TxO9v0dRL /A1IES/Fz7fBHibDLDGrZvxGkwAEA6QhGgsTOHGSvGQPc4zGPji0kpEaZoKhVfp6dkCX ICC0jjkzZFVxvt7PS6/xZVlGA5yw30EwInHvlCnAJCGsv6q80mw0YrjJCv0XbBtcQVVx y3QNfXAL1UsXemc07L7z+34ftS7QI0Z9sJyPjrXNqk6FqFbEWALjT3Uft92NwNA3me+L zZxLApjqHmw8qSJ4lBiRmatM07KloKf1FG9bHF7nxlEOn1JjUHhwpeZ1LDspce9JKuMR Va0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793176901; x=1793781701; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:content-type:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=XZ/fpSRzvi8McKRzJ+1VtbdqtbDWzEzTV6x3Fj8pdM8=; b=g8KCjC8Ou1Y/NNTwcvTeUWoFXrdcdRLMvi5xd96WGNCVH9clKdtZ/pZSVsOSo/V4gn ZM7z8obrgrKfPyUYIkAv9oQdNApCNjISrqhN4ByiLZyuQ1Rg1Jd+JXhQb2XlivwGZC/9 /weUhWEq3B9RaXsfx67LQ+pklpLEzojDW2XAgPDeQt6p5pdh1dNnqO9qElHjlsF/SDl1 gGAvGGKnPKjjmQCrt/DnMKGyxj53WMY6epeGW39OYYnNhWbJSHtybZXipri/mgsBh+2j IW8xWewOqAeJYnjp3YDtAHA53IjDc95MqrMzCNBCWVkM3skNtsIXfvLMI/Bs20n3raO6 dhbg== X-Forwarded-Encrypted: i=1; AKwUvBy0dzUDqkSkuNm3jSBNodjsO86rod+jwipWcboOmS7UwNixnimb+L6qNOcm+wFP+ebarLgVlfbr6rIS@lists.postgresql.org X-Gm-Message-State: AFq9FYJsFSVMyaKYo8EqsSRfV98puwAgWJlfhk9CmYvuRW2eGSiiAXOI mQtbt/QyqSyklaJs9DiDp4APrFl7JNP82yLazqsv8IrN5+cu5RK85m/z X-Gm-Gg: AYBFou1UXPYuYNDXK4eio3kKEiX50uMHbGwLZe6TAn0MQjipbvnokI+gyEhEIqZAibG RboQsBTcUK8/ntqQW1RRI4wbXxiKFA2plcVxscUTKJl1DzoUgaEuqRbAbTBbUgBCLzRCQGKnvUt GpW9wealGRsgJRSQnLjl7wGXXbjU6Bv7vjY+04vZMl2ZaqyBmuHttZbY0pu2GLXCj7tJ0rIfAfz B8lDwfJn7HSe6KK50qQVaHYvJ5Xyt4DunKqkiNQHoZPyEfaANSWHqPN60ZLq/b0eiLVvJw/1uC4 J+00NZbuk51gaXkiORdlt2Jo/AMA/FAh9DvxgrjjT2LLoGRRg1I2p8Vj2swhWHtgARROSAXJQad a19uM9PfLjMnry4YQ42mfi+NBMYsAxnXQh+6vpy8Cjt97hkbVvj7/z9c/gzuWPTiTd11jlOT7Na 6A0pGHYa+61tHNMu7qwkOx2gCW8YOlRdV9tfrakdZ0a1NQeACkKX5dCBJj3EdFUqedr3o9xzh6N elFgcRIgoGjjiX2Krv/0ieTxRcJHKE26NIFnvBezuaZN35AxhprEewSjeY6IFt2DQ07ro1cUdEP SQ1wiONL536e8AJtdTfql1LIob1uM5IczPXByKMLGrTnAlTduelePrlNWNA= X-Received: by 2002:a05:6a21:4ea2:b0:3dd:85aa:452a with SMTP id adf61e73a8af0-3e90230664bmr1484768637.37.1793176900693; Wed, 28 Oct 2026 01:41:40 -0700 (PDT) Received: from smtpclient.apple ([185.135.79.54]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-cd8cccbf9a3sm3663093a12.24.2026.10.28.01.41.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Oct 2026 01:41:40 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.700.51.1.1\)) Subject: Re: Streaming decoding fails with "unexpected table_index_fetch_tuple call during logical decoding" when a relation has a TOASTed conbin (follow-up to BUG #18641) From: Chao Li In-Reply-To: Date: Wed, 28 Oct 2026 16:41:05 +0800 Cc: Peter Smith , =?utf-8?B?SmnFmcOtIEthdmFsw61r?= , Zhijie Hou , pgsql-bugs Content-Transfer-Encoding: quoted-printable Message-Id: <43C69397-4F56-4B93-ADEA-DF4EFEC7E00B@gmail.com> References: To: "Hayato Kuroda (Fujitsu)" X-Mailer: Apple Mail (2.3864.700.51.1.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Oct 27, 2026, at 14:42, Hayato Kuroda (Fujitsu) = wrote: >=20 > Hi Peter, >=20 >> Since you are refactoring this flag anyway, would it be better to try >> to eliminate the global-variable completely? e.g. expose the same >> information by some accessor function. >>=20 >> -extern PGDLLIMPORT bool bsysscan; >> +extern PGDLLIMPORT int sysscan_depth; >=20 > Good point, it can be removed by providing few functions. v5 did the = same. > We need to keep bsysscan anyway for back branches, so the patch shape = for them > is slightly different, see v5-PG18. >=20 > Best regards, > Hayato Kuroda > FUJITSU LIMITED >=20 > = Hi Hayato, I agree with the solution. However, I have a minor concern about the = naming. BeginSystemTableScan() and EndSystemTableScan() sound like = functions that actually start and end system table scans, whereas they = only track sysscan_depth. How about renaming them to = TrackSystemTableScanStart() and TrackSystemTableScanEnd() to better = reflect their purpose? Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/