Re: Write skew observed under serializable isolation

From: Aleksander Alekseev <aleksander(at)tigerdata(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Jacob Brazeal <jacob(dot)brazeal(at)gmail(dot)com>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>
Subject: Re: Write skew observed under serializable isolation
Date: 2026-09-21 11:51:49
Message-ID: CAJ7c6TPjccw9zdDotmL_Fsr9MmFrp-n=A+k=rH1ANAkkjxoBCQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Jacob,

Thanks for the bug report and the fix.

> [...]
>
> It seems that using page locks here would require some additional notion of heap gap locking, or corresponding changes to the insert conflict checks. With the existing predicate-locking scheme, I think the relation lock is needed to cover inserts as well as updates.

Yes it looks like an architecturally correct approach with minimum
overall overhead. In any case anyone who wants to implement an
optimization can submit it as a separate patch.

My only nitpick is that the patch doesn't update README-SSI. The
corrected patch is attached. Also I added a proper commit message.

I believe the patch is Ready for Committer.

--
Best regards,
Aleksander Alekseev

Attachment Content-Type Size
v2-0001-Fix-write-skew-under-SERIALIZABLE-for-Tid-Range-S.patch text/x-patch 9.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Aleksander Alekseev 2026-09-21 12:01:27 Re: Open SSI correctness issues
Previous Message Nazir Bilal Yavuz 2026-09-21 11:38:21 Re: Stabilize and shorten test_checksums/013_rewind test