Re: Potential G2-item cycles under serializable isolation

Kyle Kingsbury <aphyr@jepsen.io>

From: Kyle Kingsbury <aphyr@jepsen.io>
To: Peter Geoghegan <pg@bowt.ie>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2020-06-03T16:44:42Z
Lists: pgsql-bugs
On 6/3/20 10:20 AM, Kyle Kingsbury wrote:
> On 6/2/20 7:17 PM, Peter Geoghegan wrote:  >> It seems kind of inconvenient to run Jepsen -- I suppose I could >> use 
Docker or something like that, but I don't have experience >> with it. What do 
you think is the simplest workflow for somebody >> that just wants to recreate 
your result on a Debian system? > > I'll see about writing a version of the test 
that doesn't use any of > the automation, so you can point it at a local 
postgres instance. > Then all you'll need is lein and a jdk.
OK, I think we're all set. With Jepsen 0ec25ec3, you should be able to run:

cd stolon;

lein run test-all -w append --max-writes-per-key 4 --concurrency 50 -r 500 
--isolation serializable --time-limit 60 --nemesis none --existing-postgres 
--node localhost --no-ssh --postgres-user jepsen --postgres-password pw

... and it'll connect to an already-running instance of Postgres on localhost 
(or whatever you want to connect to) using the provided username and password. 
It expects a DB with the same name as the user. You'll need a JDK (1.8 or 
higher), and Leiningen (https://leiningen.org/), which should be pretty easy to 
install. :)

> Could you test Postgres 9.5? It would be nice to determine if this  > is a new issue, or a regression.

I can also confirm that Postgres 9.5.22, 10.13, and 11.8 all exhibit the same 
G2-item anomalies as 12.3. It looks like this issue has been here a while! 
(Either that, or... my transactions are malformed?).

Is there additional debugging data I can get you that'd be helpful? Or if you'd 
like, I can hop in an IRC or whatever kind of chat/video session you'd like to 
help you get these Jepsen tests running.

--Kyle


Commits

  1. Doc: Add references for SI and SSI.

  2. Improve comments for [Heap]CheckForSerializableConflictOut().

  3. Avoid update conflict out serialization anomalies.

  4. Implement genuine serializable isolation level.