Re: Confusions regards serializable transaction - Mailing list pgsql-novice

From Peter Geoghegan
Subject Re: Confusions regards serializable transaction
Date
Msg-id CAH2-WzkdNKZ+fZ9r+98ZbYR7iV4x7NJr6sh6og=R3xge5fUVvQ@mail.gmail.com
Whole thread Raw
In response to Confusions regards serializable transaction  (Hannah Huang <hannah.huang.y@gmail.com>)
Responses Re: Confusions regards serializable transaction
List pgsql-novice
On Thu, Sep 3, 2020 at 5:20 PM Hannah Huang <hannah.huang.y@gmail.com> wrote:
> I’m confused about what will trigger the serializable error. My test environment is PG v12.
>
> This is how you can produce the test table:

Serializable isolation level promises to emulate serial transaction
execution for all committed transactions. I believe that your example
does not show behavior that breaks that specific promise.

I haven't thought about it much, but maybe the confusion here has
something to do with the fact that the transaction snapshot is not
acquired during the "begin isolation level serializable" statement.
It's actually acquired lazily, during the first
non-transaction-control statement in the transaction.

--
Peter Geoghegan



pgsql-novice by date:

Previous
From: Hannah Huang
Date:
Subject: Confusions regards serializable transaction
Next
From: Hannah Huang
Date:
Subject: Re: Confusions regards serializable transaction