Re: Make TID Scans recalculate the TIDs less often - Mailing list pgsql-hackers

From David Rowley
Subject Re: Make TID Scans recalculate the TIDs less often
Date
Msg-id CAApHDvroAnYTx3GG-ebhZkRe9JiENke0x5jdh17nw4Rfx+tKNg@mail.gmail.com
Whole thread Raw
In response to Re: Make TID Scans recalculate the TIDs less often  (Andrey Borodin <x4mmm@yandex-team.ru>)
Responses Re: Make TID Scans recalculate the TIDs less often
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Maxime Schoemans
Date:
Subject: [PATCH] Check that index can return in get_actual_variable_range()
Next
From: "Vitaly Davydov"
Date:
Subject: Re: Newly created replication slot may be invalidated by checkpoint