pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chao Li <li.evan.chao@gmail.com>
To: Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>
Cc: Peter Smith <smithpb2250@gmail.com>
Cc: Jiří Kavalík <jiri.kavalik@comgate.cz>
Cc: Zhijie Hou <houzhijie22@gmail.com>
Cc: pgsql-bugs <pgsql-bugs@lists.postgresql.org>
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)
Date: Wed, 28 Oct 2026 16:41:05 +0800
Message-ID: <43C69397-4F56-4B93-ADEA-DF4EFEC7E00B@gmail.com> (raw)
In-Reply-To: <OS7PR01MB18317A05F215BBCB42AE6609FF5602@OS7PR01MB18317.jpnprd01.prod.outlook.com>
References: <OS7PR01MB183170479614BCD8C3E2F8560F5892@OS7PR01MB18317.jpnprd01.prod.outlook.com>
	<CAFvd2n9Ooq4UQ4er2faS5StHXAFz61=paLRYn0g2gvUo7j5S_Q@mail.gmail.com>
	<OS7PR01MB183176541B4DF2EFBB09AFFB1F5932@OS7PR01MB18317.jpnprd01.prod.outlook.com>
	<CAF7a2M84vrA6zjxStLvWstP0x4D5kT0BEo4prVqj+fO4W7qtuw@mail.gmail.com>
	<OS7PR01MB183179632B3AB53396AD34C61F5922@OS7PR01MB18317.jpnprd01.prod.outlook.com>
	<OS7PR01MB18317A51082A83624D6F092CAF5612@OS7PR01MB18317.jpnprd01.prod.outlook.com>
	<CAHut+Pt+eFDYw=u=B4zSa0iN=XaOa1quCfY-Xg2+=y6r-sxQ8w@mail.gmail.com>
	<OS7PR01MB18317A05F215BBCB42AE6609FF5602@OS7PR01MB18317.jpnprd01.prod.outlook.com>



> On Oct 27, 2026, at 14:42, Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com> wrote:
> 
> Hi Peter,
> 
>> 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.
>> 
>> -extern PGDLLIMPORT bool bsysscan;
>> +extern PGDLLIMPORT int sysscan_depth;
> 
> 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.
> 
> Best regards,
> Hayato Kuroda
> FUJITSU LIMITED
> 
> <v5-0001-Track-the-depth-of-scans-of-system-tables.patch><nocfbot-v5-PG18-0001-Track-the-depth-of-scans-of-system-tables.patch><nocfbot-v5-PG19-0001-Track-the-depth-of-scans-of-system-tables.patch>

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/










view thread (18+ messages)  latest in thread

Message-ID: <43C69397-4F56-4B93-ADEA-DF4EFEC7E00B@gmail.com>
Permalink:  ../43C69397-4F56-4B93-ADEA-DF4EFEC7E00B@gmail.com/
Also on:    postgresql.org/message-id/43C69397-4F56-4B93-ADEA-DF4EFEC7E00B@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: li.evan.chao@gmail.com, kuroda.hayato@fujitsu.com, smithpb2250@gmail.com, jiri.kavalik@comgate.cz, houzhijie22@gmail.com
  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)
  In-Reply-To: <43C69397-4F56-4B93-ADEA-DF4EFEC7E00B@gmail.com>
  References: <OS7PR01MB183170479614BCD8C3E2F8560F5892@OS7PR01MB18317.jpnprd01.prod.outlook.com> <CAFvd2n9Ooq4UQ4er2faS5StHXAFz61=paLRYn0g2gvUo7j5S_Q@mail.gmail.com> <OS7PR01MB183176541B4DF2EFBB09AFFB1F5932@OS7PR01MB18317.jpnprd01.prod.outlook.com> <CAF7a2M84vrA6zjxStLvWstP0x4D5kT0BEo4prVqj+fO4W7qtuw@mail.gmail.com> <OS7PR01MB183179632B3AB53396AD34C61F5922@OS7PR01MB18317.jpnprd01.prod.outlook.com> <OS7PR01MB18317A51082A83624D6F092CAF5612@OS7PR01MB18317.jpnprd01.prod.outlook.com> <CAHut+Pt+eFDYw=u=B4zSa0iN=XaOa1quCfY-Xg2+=y6r-sxQ8w@mail.gmail.com> <OS7PR01MB18317A05F215BBCB42AE6609FF5602@OS7PR01MB18317.jpnprd01.prod.outlook.com> <43C69397-4F56-4B93-ADEA-DF4EFEC7E00B@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox