Re: Possible G2-item at SERIALIZABLE - Mailing list pgsql-bugs

From Andrey Borodin
Subject Re: Possible G2-item at SERIALIZABLE
Date
Msg-id 84AC98E5-3387-40A5-A258-C6E354349154@yandex-team.ru
Whole thread
In response to Possible G2-item at SERIALIZABLE  (Kyle Kingsbury <aphyr@aphyr.com>)
Responses Re: Possible G2-item at SERIALIZABLE
List pgsql-bugs
Hello Kyle!

> On 22 May 2026, at 21:44, Kyle Kingsbury <aphyr@aphyr.com> wrote:
>
> I am relatively confident that isolation levels and transactions are
> being used correctly, because when I adjust the isolation level from
> Serializable to (e.g.) Read Committed, I see vastly different anomalies.
> I can also reproduce the problem both using JDBC's transaction calls,
> and with explicit BEGIN; SET TRANSACTION ISOLATION LEVEL
> SERIALIZABLE; ...; COMMIT;, which makes me think that it's not a bug in
> the way next.jdbc or the JDBC driver handle transactions.

I agree the multi-statement path looks correct, and I don't think next.jdbc or the
driver are at fault either. But I think there's a narrower issue that both of your
checks leave untouched: single-operation transactions are never wrapped in
a transaction at all.

In append's invoke!, a transaction is only opened when it has more than one op [0].

Could you confirm whether you still observe G2-item anomalies with a server
configured default_transaction_isolation = 'serializable' (so that the
single-statement operations are certainly Serializable)? If they persist under that
setting I'll dig further...


Best regards, Andrey Borodin.

[0] https://github.com/jepsen-io/sql/blob/6e34b76e2ac6a1c3edb5a9cab1c835eda4ca4c5e/src/jepsen/sql/append.clj#L155-L160


pgsql-bugs by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: BUG #19490: Streaming standby on 16.14 stops applying WAL on MultiXactOffsetSLRU when primary is 16.8
Next
From: Andrey Borodin
Date:
Subject: Re: BUG #19458: OOM killer in jsonb_path_exists_opr (@?) with malformed JSONPath containing non-existent variables