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: Jiří Kavalík <jiri(dot)kavalik(at)comgate(dot)cz>
To: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
Cc: Zhijie Hou <houzhijie22(at)gmail(dot)com>, pgsql-bugs <pgsql-bugs(at)lists(dot)postgresql(dot)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: 2026-10-08 05:35:07
Message-ID: CAF7a2M84vrA6zjxStLvWstP0x4D5kT0BEo4prVqj+fO4W7qtuw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Kuroda-san,

> For HEAD, yes, the boolean can be removed from everywhere, see attached.

One small thing in v2-HEAD: the definition in xact.c is left behind.
With the patch applied on master (061065e), "git grep -w bsysscan" still
finds

src/backend/access/transam/xact.c:103:bool bsysscan = false;

and since the extern is gone from xact.h, gcc 14 warns:

xact.c:103:17: warning: no previous declaration for 'bsysscan'
[-Wmissing-variable-declarations]

Removing that line should be enough. The comment above it in xact.c may also
want a word about the counter.

Regards,
Jiří Kavalík

čt 8. 10. 2026 v 4:36 odesílatel Hayato Kuroda (Fujitsu) <
kuroda(dot)hayato(at)fujitsu(dot)com> napsal:

> Dear Hou,
>
> Thanks for the review!
>
> > I think using a counter to fix this is OK. But I'm wondering whether it's
> > necessary to keep both the boolean and the counter, could we merge them
> into
> > a
> > single parameter to simplify things?
>
> Actually it's intentional because the initially attached patch was for
> PG18.
> bsysscan was exported and functions in tableam.h referred it. I did not
> want to
> modify the header as much as possible thus they were retained.
>
> For HEAD, yes, the boolean can be removed from everywhere, see attached.
> I will create patched for back branches when they are stabilized.
>
> Best regards,
> Hayato Kuroda
> FUJITSU LIMITED
>
>

--
S pozdravem
Jiří Kavalík
jiri(dot)kavalik(at)comgate(dot)cz
Comgate a.s.
Gočárova třída 1754/48b, 500 02 Hradec Králové
www.comgate.cz

In response to

Browse pgsql-bugs by date

  From Date Subject
Previous Message Hayato Kuroda (Fujitsu) 2026-10-08 02:36:48 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)