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) - Mailing list pgsql-bugs

From Jiří Kavalík
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
Msg-id CAF7a2M84vrA6zjxStLvWstP0x4D5kT0BEo4prVqj+fO4W7qtuw@mail.gmail.com
Whole thread
In response to 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)  ("Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>)
Responses 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)
List 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.hayato@fujitsu.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
Comgate a.s.
Gočárova třída 1754/48b, 500 02 Hradec Králové

pgsql-bugs by date:

Previous
From: "Hayato Kuroda (Fujitsu)"
Date:
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)
Next
From: John Naylor
Date:
Subject: Re: BUG #19597: getQuadrant: impossible case is reachable