Question on SSI - Serializable Snapshot Isolation

From: Siddharth Jain <siddhsql(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Question on SSI - Serializable Snapshot Isolation
Date: 2023-04-17 15:37:16
Message-ID: CAPqV3pTLaijfRegcKXkhqXnFVxWxXR7sSmDvbXFts_cn+bmquQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi All,

When using SSI <https://wiki.postgresql.org/wiki/SSI>, lets say we have two
transactions T1 and T2 and there is a serialization conflict. Postgres
knows when one or the other transaction is doomed to fail
[image: image.png]
but will not raise serialization error until the transaction commits. This
can cause a massive perf hit because the transactions could be long
running. Why not raise the error early on when the conflict is detected to
avoid wasting CPU and other resources? Can anyone explain this to me? Is
this an area that could be improved upon? Thanks.

S.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2023-04-17 15:38:34 Re: Should I add a new schema for my application?
Previous Message Ron 2023-04-17 13:11:54 Re: Suppress logging of "pg_hba.conf rejects connection for host"