Re: Potential G2-item cycles under serializable isolation

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Kyle Kingsbury <aphyr(at)jepsen(dot)io>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Kevin Grittner <kgrittn(at)gmail(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Potential G2-item cycles under serializable isolation
Date: 2020-06-11 22:51:42
Message-ID: CAH2-WzkwhCz3dRXPU0GH182sBNsA85noKTBFaOA2Trit0t-RiA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Jun 10, 2020 at 8:14 PM Kyle Kingsbury <aphyr(at)jepsen(dot)io> wrote:
> I wanted to let you know that I've put together a draft of a report on these
> findings, and if you've got any comments you'd like to offer, I'd be happy to
> hear them, either on-list or privately.
> http://jepsen.io/analyses/postgresql-12.3?draft-token=Kets1Quayfs

You should mention that a fix was committed this morning:

https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=5940ffb221316ab73e6fdc780dfe9a07d4221ebb

You may want to draw attention to the isolation test, since it's a
perfect distillation of the bug. I'm certain that it cannot be
simplified any further.

Note that the test involves three transactions/sessions -- not two.
Elle always complained about a pair of transactions that had a cycle,
which were similar to the "foo" and "bar" sessions from the test. But
Elle never said anything about a third transaction (that played the
role of the "trouble" transaction from the test). Of course, this
makes perfect sense -- the third/"trouble" transaction *should* be
totally irrelevant. Note that the UPDATE has to come from a third
session/transaction for things to go awry. And note that the order of
each statement has to match the order from the isolation test. For
example, no problems occur if you flip the order of "trouble_update"
and "bar_select" -- because that would mean that the physical tuple
does not get physically updated before being examined by "bar_select".

You should also specifically mention that the next upcoming minor
release will be on August 13th, 2020:

https://www.postgresql.org/developer/roadmap/

Users that are concerned about this bug will be able to get a new
minor release with the fix by that date, at the latest.

Thanks
--
Peter Geoghegan

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Kyotaro Horiguchi 2020-06-12 01:51:31 Re: BUG #16476: pgp_sym_encrypt_bytea with compress-level=6 : Wrong key or corrupt data
Previous Message Thomas Munro 2020-06-11 22:14:47 Re: Potential G2-item cycles under serializable isolation