On Wed, 17 Sept 2025 at 22:13, Andrey Borodin <x4mmm@yandex-team.ru> wrote:
> Occasionally (when dealing with corruption) I do stuff like
>
> begin;
> update public.tablename set description = description where ctid in (select
('('||b.blkno::text||','||(x::text)||')')::tidfrom generate_series(1,300) x, blocks b);
>
> in some forms they are actually joins. Also, pageinspecting things out is always a join (CTAS a copy of table rows
thathave particular infomask bits). But, fortunately, it's not that frequent case. It's always "plumbing", not a
"regulardatabase usage".
Thanks for sharing that one. If that UPDATE did do a Nested Loop join
with a TID Scan on the inner side, the optimisation I have in the
patch *wouldn't* be applied as a parameter is changing that genuinely
does need the TidList to be recalculated over again.
David