| 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>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com> |
| Subject: | Re: Write skew observed under serializable isolation |
| Date: | 2026-09-21 12:41:54 |
| Message-ID: | CAJ7c6TNpThuh1C34GSBUuT=WcpSjM882wOWHQSgKojANQxJztw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Andrey,
Thanks for the great feedback.
> > +# other one read. No serial order produces sum(p) = 2, ...
>
> The constant assignments in this test produce a final sum of 2 in either
> serial order too. The anomaly is that both preceding reads return 0.
> Could we correct the comment? The test itself demonstrates the bug.
Good catch. Fixed.
> Maybe we could also cover inserts after scanning an initially empty
> table. That would guard against moving lock acquisition into a per-page
> path later: there are no existing pages to lock. Without the fix both
> transactions commit; with v2 one is aborted.
Agree. Added.
--
Best regards,
Aleksander Alekseev
| Attachment | Content-Type | Size |
|---|---|---|
| v3-0001-Fix-write-skew-under-SERIALIZABLE-for-Tid-Range-S.patch | text/x-patch | 11.7 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Matthias van de Meent | 2026-09-21 12:44:49 | Re: [PATCH] set_byte() with a count argument |
| Previous Message | vignesh C | 2026-09-21 12:31:39 | Re: Logical replication can lose an update after concurrent index invalidation |