Question on SSI - Serializable Snapshot Isolation - Mailing list pgsql-general

From Siddharth Jain
Subject Question on SSI - Serializable Snapshot Isolation
Date
Msg-id CAPqV3pTLaijfRegcKXkhqXnFVxWxXR7sSmDvbXFts_cn+bmquQ@mail.gmail.com
Whole thread Raw
Responses Re: Question on SSI - Serializable Snapshot Isolation
List pgsql-general
Hi All,

When using 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.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.
Attachment

pgsql-general by date:

Previous
From: Ron
Date:
Subject: Re: Suppress logging of "pg_hba.conf rejects connection for host"
Next
From: Laurenz Albe
Date:
Subject: Re: Should I add a new schema for my application?