On Mon, 27 Jul 2026 at 07:58, Jacob Brazeal <[email protected]> wrote:
>
> Hi hackers,
>
> I found that a query using a Tid Range Scan can allow write skew under 
> `SERIALIZABLE`.

Good find!

On Mon, 27 Jul 2026 at 08:05, Jacob Brazeal <[email protected]> wrote:
>
> A candidate patch to fix is attached.

I think this patch is taking locks too aggressively; we shouldn't take
a predlock on the whole relation when we're only looking at a small
portion of the table using TID ranges. I think the more appropriate
place to add the predicate locks is in heap_set_tidrange(), and have
Assert(PageIsPredicateLocked(...)) for the returned TID in
heap_getnextslot_tidrange() to make sure we don't regress.

Kind regards,

Matthias van de Meent.


Reply via email to