Re: Fix missing EvalPlanQual recheck for TID scans

Sophie Alpert <pg@sophiebits.com>

From: "Sophie Alpert" <pg@sophiebits.com>
To: "David Rowley" <dgrowleyml@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2025-09-15T17:41:27Z
Lists: pgsql-hackers
On Mon, Sep 15, 2025 at  4:23 AM, David Rowley <dgrowleyml@gmail.com> wrote:
> For the v2 patch, I've hacked on that a bit and stripped out the
> trss_boundsInitialized stuff and just make it so we recalculate the
> TID List/Range on every recheck. I also added another isolation test
> permutation to have s1 rollback and ensure that s2 updates the ctid =
> '(0,1)' tuple.

Thanks, this seems sensible given the reality that rescan happens once per tuple. The `if (node->tss_TidList == NULL)` check you kept from me seems likewise pointless in v3-0001 but not particularly intrusive (though of course you use it in v3-0002).

Otherwise v3-0001 lgtm. (I also took a look at v3-0002 and don't see any immediate issues, though neither would I really consider myself qualified to review it.)

Sophie



Commits

  1. Add missing EPQ recheck for TID Range Scan

  2. Add missing EPQ recheck for TID Scan

  3. Repair problems with EvalPlanQual where target table is scanned as

  4. Tid access method feature from Hiroshi Inoue, Inoue@tpf.co.jp