Re: Potential G2-item cycles under serializable isolation - Mailing list pgsql-bugs

From Kyle Kingsbury
Subject Re: Potential G2-item cycles under serializable isolation
Date
Msg-id CAMotZ_w2-bdQms+rFa-DA_vH+y7A=ky0Gmwu9Y81LT=2ge5TtQ@mail.gmail.com
Whole thread Raw
In response to Re: Potential G2-item cycles under serializable isolation  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: Potential G2-item cycles under serializable isolation  (Thomas Munro <thomas.munro@gmail.com>)
Re: Potential G2-item cycles under serializable isolation  (Peter Geoghegan <pg@bowt.ie>)
List pgsql-bugs
Oh! Gosh, yes, that DOES explain it. Somehow I had it in my head that both RU and RC mapped to SI, and RR & Serializable mapped to SSI. That's the case in YugabyteDB, but not here!

I'll also see about getting a version of these tests that doesn't involve ON CONFLICT, in case that's relevant.

--Kyle

On Sun, May 31, 2020, 23:56 Peter Geoghegan <pg@bowt.ie> wrote:
On Sun, May 31, 2020 at 8:37 PM Kyle Kingsbury <aphyr@jepsen.io> wrote:
> This looks so weird that I assume I've *got* to be doing it wrong, but trawling
> through the source code and pcap trace, I can't see where the mistake is. Maybe
> I'll have fresher eyes in the morning. :)

READ COMMITTED starts each command within a transaction with its own
snapshot, much like Oracle:

https://www.postgresql.org/docs/devel/transaction-iso.html

There cannot be serialization errors with READ COMMITTED mode, and in
general it is a lot more permissive. Probably to the point where it
isn't sensible to test with Jepsen at all.

It would make sense for you to test REPEATABLE READ isolation level
separately, though. It implements snapshot isolation without the added
overhead of the mechanisms that prevent (or are supposed to prevent)
serialization anomalies.

--
Peter Geoghegan

pgsql-bugs by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Potential G2-item cycles under serializable isolation
Next
From: Thomas Munro
Date:
Subject: Re: Potential G2-item cycles under serializable isolation