Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wUKKk-0015Ot-01 for pgsql-bugs@arkaria.postgresql.org; Tue, 02 Jun 2026 08:18:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wUKKi-00DcXl-2k for pgsql-bugs@arkaria.postgresql.org; Tue, 02 Jun 2026 08:18:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wUKKi-00DcXd-1w for pgsql-bugs@lists.postgresql.org; Tue, 02 Jun 2026 08:18:44 +0000 Received: from forwardcorp1a.mail.yandex.net ([178.154.239.72]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wUKKg-00000000otb-1WnJ for pgsql-bugs@lists.postgresql.org; Tue, 02 Jun 2026 08:18:44 +0000 Received: from mail-nwsmtp-smtp-corp-main-69.vla.yp-c.yandex.net (mail-nwsmtp-smtp-corp-main-69.vla.yp-c.yandex.net [IPv6:2a02:6b8:c1f:3a87:0:640:845c:0]) by forwardcorp1a.mail.yandex.net (Yandex) with ESMTPS id 25B7DC01FA; Tue, 02 Jun 2026 11:18:41 +0300 (MSK) Received: from smtpclient.apple (unknown [2a02:6bf:8080:d96::1:3a]) by mail-nwsmtp-smtp-corp-main-69.vla.yp-c.yandex.net (smtpcorp) with ESMTPSA id eIaXVP2ZIqM0-KxeiJqk3; Tue, 02 Jun 2026 11:18:40 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1780388320; bh=Ahv+o9+i1Z4PXzpVdtkIIdWhs0tSKlE95G6iRXPIF7M=; h=Message-Id:To:Date:References:Cc:In-Reply-To:From:Subject; b=MRamroZmYpbBTjIR1YFadCD7iAu1lzsRKXtZmid7aQD8DwrJHl2Zfn0b/pUepJasw kcia31Az4Qfaq1Sji/LBy5gtG0/z0MZx+2XDIPwdHStoogq4uLJMVCwM2WBsGKARmy qME6VZBu1bw0/pFkjdkPua+Y08AWwLPlW7MfdDA0= Authentication-Results: mail-nwsmtp-smtp-corp-main-69.vla.yp-c.yandex.net; dkim=pass header.i=@yandex-team.ru Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.600.51.1.1\)) Subject: Re: Possible G2-item at SERIALIZABLE From: Andrey Borodin In-Reply-To: Date: Tue, 2 Jun 2026 13:18:29 +0500 Cc: PostgreSQL mailing lists Content-Transfer-Encoding: quoted-printable Message-Id: <92417390-9753-4F6D-AE30-DA10FFF2A4DA@yandex-team.ru> References: <165342c0-0c75-461e-b334-b997639ad48d@aphyr.com> <1F2F4318-437C-4AE1-8413-F94FBDD5AB68@yandex-team.ru> To: Zsolt Parragi X-Mailer: Apple Mail (2.3864.600.51.1.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 2 Jun 2026, at 03:00, Zsolt Parragi = wrote: >=20 > + /* > + * Mark ourselves doomed before raising the error. Otherwise a > + * subtransaction abort (ROLLBACK TO SAVEPOINT) could swallow this > + * error and let the transaction commit anyway, defeating SSI. > + */ > + MySerializableXact->flags |=3D SXACT_FLAG_DOOMED; > LWLockRelease(SerializableXactHashLock); > ereport(ERROR, > (errcode(ERRCODE_T_R_SERIALIZATION_FAILURE), >=20 > I wonder if it would make sense to introduce a > "DoomMyselfAndRaiseSerializationFailure" helper for this, while fixing > all occurrences we can find? That would make it more explicit, and > also less repeated. >=20 >> PFA attached isolation tester and hand-wavy fix. But I suspect there = are more G-items >> around. >=20 > There are at least 2 more reproducible with the isolation tester in > CheckForSerializableConflictOut ("conflict out to old pivot %u", and > "conflict out to old committed transaction %u" directly below it). > Probably "Canceled on conflict out to old pivot." also should have the > same changes? Thanks for looking into this! I agree fix needs some refinement and can be improved. However, let's settle on the bug first. Do you think that recovering serialization error with ROLLBACK TO = SAVEPOINT is a bug? Honestly, I'm not entirely convinced myself. AFAIU SSI docs do not = describe this case clearly. Best regards, Andrey Borodin.=