pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kyle Kingsbury <aphyr@jepsen.io>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Peter Geoghegan <pg@bowt.ie>
Cc: Andres Freund <andres@anarazel.de>
Cc: Kevin Grittner <kgrittn@gmail.com>
Cc: Jeff Davis <pgsql@j-davis.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: Potential G2-item cycles under serializable isolation
Date: Thu, 11 Jun 2020 08:39:13 -0400
Message-ID: <16b323b2-dfdb-a4c4-fd9d-7b81e52c2375@jepsen.io> (raw)
In-Reply-To: <CA+hUKGJgSn+JF929bMpxhn21p0ArUwjs_RrxGKb2_6Fuu5J09w@mail.gmail.com>
References: <CAH2-WznZO2kgJr+jR5mSp3bsSZKqbevztdPq-eZLcgGML_vBMw@mail.gmail.com>
	<80e772f7-a46d-7bfd-28d0-4017bf5cd2e5@jepsen.io>
	<CAH2-WznURpoCuxHV28kBsNwi9TDM0zMkrA8JjTvymXaYfyCOkQ@mail.gmail.com>
	<e1c7919d-2dc5-4099-e825-9bda876f2e82@jepsen.io>
	<CAH2-WznZTCC15qJwpR=12YEO0wdJGze=JnySAwj66UFme08yUA@mail.gmail.com>
	<CAH2-WznTb6-0fjW4WPzNQh4mFvBH86J7bqZpNqteVUzo8p=6Hg@mail.gmail.com>
	<d91de157-b590-dd4b-3585-79f4ece79dfa@jepsen.io>
	<CAH2-Wz=9szcV1CQk4ZTj2GOKdjzf_DAAbfXdssKJnxpdX3pL2A@mail.gmail.com>
	<CAH2-Wzk+FHVJvSS9VPPJ_K9w4xwqeVyfnkzYWtWrBzXJSJcMVQ@mail.gmail.com>
	<CAH2-Wzkk5CS2emjrftQXemjDVNkYSrUEXtHd-hoxBGsjSA01Ew@mail.gmail.com>
	<20200609021706.62lwps6uywkp4kxt@alap3.anarazel.de>
	<CAH2-Wz=n7P5S_+mJHaZa4EP3qM9CGidSvocy38hm+TLvhWp1-A@mail.gmail.com>
	<CAH2-Wzk=-gRrZP4mvsFeFN8VQDw2WNdS8AnJG8eX020Q7XSmMQ@mail.gmail.com>
	<0a53caa2-d568-0283-a448-96bd4d68c235@jepsen.io>
	<CA+hUKGJgSn+JF929bMpxhn21p0ArUwjs_RrxGKb2_6Fuu5J09w@mail.gmail.com>

On 6/11/20 1:40 AM, Thomas Munro wrote:
> What do you think about this documentation update?

I think this is really helpful! You can go a little further if you like. Right 
now, SSI vs serializable and SI vs RR are both described as "differences in 
behavior", which kinda leaves it unclear as to how those levels are related. If 
you want to follow Berenson, Adya, et al.'s broad interpretation, I'd say 
something like

"Snapshot isolation prevents some anomalies, like phantoms, which repeatable 
read allows. It also allows some anomalies, like G2-item (write skew), which 
repeatable read prevents."

... and if you like, you could follow that with a discussion of how SI, thanks 
to ambiguity in the ANSI specification, could also be interpreted as stronger 
than RR. If you stick with the strict interpretation, I'd add a note here about 
how readers familiar with the SI literature might be confused, and that you're 
diverging from Berenson et al., but your position is defensible under the spec.

"Serializable Snapshot Isolation is stronger than serializability: it allows 
only serializable histories--and prohibits some additional histories in addition."

If you wanna talk about the performance rationale, that's valid too. :)

--Kyle






view thread (77+ messages)  latest in thread

Message-ID: <16b323b2-dfdb-a4c4-fd9d-7b81e52c2375@jepsen.io>
Permalink:  ../16b323b2-dfdb-a4c4-fd9d-7b81e52c2375@jepsen.io/
Also on:    postgresql.org/message-id/16b323b2-dfdb-a4c4-fd9d-7b81e52c2375@jepsen.io

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: aphyr@jepsen.io, thomas.munro@gmail.com, pg@bowt.ie, andres@anarazel.de, kgrittn@gmail.com, pgsql@j-davis.com
  Subject: Re: Potential G2-item cycles under serializable isolation
  In-Reply-To: <16b323b2-dfdb-a4c4-fd9d-7b81e52c2375@jepsen.io>
  References: <CAH2-WznZO2kgJr+jR5mSp3bsSZKqbevztdPq-eZLcgGML_vBMw@mail.gmail.com> <80e772f7-a46d-7bfd-28d0-4017bf5cd2e5@jepsen.io> <CAH2-WznURpoCuxHV28kBsNwi9TDM0zMkrA8JjTvymXaYfyCOkQ@mail.gmail.com> <e1c7919d-2dc5-4099-e825-9bda876f2e82@jepsen.io> <CAH2-WznZTCC15qJwpR=12YEO0wdJGze=JnySAwj66UFme08yUA@mail.gmail.com> <CAH2-WznTb6-0fjW4WPzNQh4mFvBH86J7bqZpNqteVUzo8p=6Hg@mail.gmail.com> <d91de157-b590-dd4b-3585-79f4ece79dfa@jepsen.io> <CAH2-Wz=9szcV1CQk4ZTj2GOKdjzf_DAAbfXdssKJnxpdX3pL2A@mail.gmail.com> <CAH2-Wzk+FHVJvSS9VPPJ_K9w4xwqeVyfnkzYWtWrBzXJSJcMVQ@mail.gmail.com> <CAH2-Wzkk5CS2emjrftQXemjDVNkYSrUEXtHd-hoxBGsjSA01Ew@mail.gmail.com> <20200609021706.62lwps6uywkp4kxt@alap3.anarazel.de> <CAH2-Wz=n7P5S_+mJHaZa4EP3qM9CGidSvocy38hm+TLvhWp1-A@mail.gmail.com> <CAH2-Wzk=-gRrZP4mvsFeFN8VQDw2WNdS8AnJG8eX020Q7XSmMQ@mail.gmail.com> <0a53caa2-d568-0283-a448-96bd4d68c235@jepsen.io> <CA+hUKGJgSn+JF929bMpxhn21p0ArUwjs_RrxGKb2_6Fuu5J09w@mail.gmail.com> <16b323b2-dfdb-a4c4-fd9d-7b81e52c2375@jepsen.io>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox