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 1wUAgH-000zLW-13 for pgsql-bugs@arkaria.postgresql.org; Mon, 01 Jun 2026 22:00:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wUAgG-00BJCm-0l for pgsql-bugs@arkaria.postgresql.org; Mon, 01 Jun 2026 22:00:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wUAgF-00BJCd-2y for pgsql-bugs@lists.postgresql.org; Mon, 01 Jun 2026 22:00:19 +0000 Received: from mail-yw1-x1129.google.com ([2607:f8b0:4864:20::1129]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wUAgE-00000000dvx-1KbX for pgsql-bugs@lists.postgresql.org; Mon, 01 Jun 2026 22:00:19 +0000 Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-7e87602f26aso3327957b3.1 for ; Mon, 01 Jun 2026 15:00:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1780351217; cv=none; d=google.com; s=arc-20240605; b=X22ggtZsanzbt2KYoph6jbSaBHQOCG6cVh1EDc380CqXey1q4BGSXRXyio7/1NbAr0 OgaKxggVzhV/Ps+dHKUSHGifah5/Duz8gPfOFx4jo9A9XtMF8RCmx/fMVeG9DLnnEa4n j36Whr8TxXrJSiKNxUHNKGCNDVY84mLHQ6b1viF/GLEkERSYhPQnwvTAV5Y3+hkt7sJc jk1qURW052Zu11TozxlWpb575NLNleXXQXNtFRv/jn952kce9lNdEVejNQrwtX8qAo0M XA+zmrmBmB+byveen1R963X0EvdMowjas/yvDOF6lCXgbgtKUkwJH+4OgItCE6EHXzfD XvGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=to:subject:message-id:date:mime-version:references:in-reply-to:from :dkim-signature; bh=UOfMTibfIBV0wWcX23dfFyN3kmitnIP7MD46/zIoJtQ=; fh=/gQe77b11iMZdcPj/nJr/Ghqi6rQp5FPrPbdO93bmOA=; b=L3lhnqgIYsj1i75+XyHV951+P6fuwudgz6nsPuXjOvcHQuL4hHamAIb3PPd4yxZ7Bd CEnM6IcmIOm+3JCHRA1XSVI9OHeNmAo0Q0j4RaKBRMBmwlhboSg2KEd9Pncnmw7vBlqK CJ4LRECrGvIgaIRgp9G+LPhwT/qv12R7oMyl/K7V+itnZ7XobeUYlGZyyCp70oYMw1hA A3rZbrTyxZNN9QJndZlseKyHRs3oFx+ViMMc0klYQheD0/3MIPMP1keE3twd0LLDNrwi UBptOPDMpXML0KjiOsDLX1XZy2KaAimwpfO9PeQtI99CJdgSUcrkmH3K1qIQOln6i3Ql TTcg==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=percona.com; s=google; t=1780351217; x=1780956017; darn=lists.postgresql.org; h=to:subject:message-id:date:mime-version:references:in-reply-to:from :from:to:cc:subject:date:message-id:reply-to; bh=UOfMTibfIBV0wWcX23dfFyN3kmitnIP7MD46/zIoJtQ=; b=M8gWMmkA/EDKDe+qlL8CohyWPs6P4z+plL08aQtd3H3Dup6iFu6IsAq/ZhzWcR2CpJ LROhqphzmdRc6CyInQlr3yreeXDyGLXJWvPoa8IT0/4qHBZYI+CvSnHDkMe0tyM7J5oS hG/HNtlN4edTwQGXS9kVGjPSkmkfbCI/ZB9eQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780351217; x=1780956017; h=to:subject:message-id:date:mime-version:references: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Zq5cFu6/vJry2M6N6wHaiNDt8heYLO4FXKgyxW33Al77ZB//SY iCqeJLO8QlkcSI6yD8h/hI+f88NfdxAjerTs+0NDbVevKJY6r9O+0pYuSN7r7qx/VBe6JnOFOv5 sqo4= X-Received: by 2002:a05:690c:3613:b0:7b4:6f40:654 with SMTP id 00721157ae682-7e8389c230bmr14929077b3.4.1780351217103; Mon, 01 Jun 2026 15:00:17 -0700 (PDT) Received: from 298783833264 named unknown by gmailapi.google.com with HTTPREST; Mon, 1 Jun 2026 15:00:16 -0700 Received: from 298783833264 named unknown by gmailapi.google.com with HTTPREST; Mon, 1 Jun 2026 15:00:16 -0700 From: Zsolt Parragi In-Reply-To: <1F2F4318-437C-4AE1-8413-F94FBDD5AB68@yandex-team.ru> References: <165342c0-0c75-461e-b334-b997639ad48d@aphyr.com> <1F2F4318-437C-4AE1-8413-F94FBDD5AB68@yandex-team.ru> MIME-Version: 1.0 Date: Mon, 1 Jun 2026 15:00:16 -0700 X-Gm-Features: AVHnY4I1jgaHIuoLHM6kcvwV4w2cMGdm2sBj8uT82IiVzMKTrPH1sjIZtJKZ1Mw Message-ID: Subject: Re: Possible G2-item at SERIALIZABLE To: pgsql-bugs@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" X-CLOUD-SEC-AV-Sent: true X-CLOUD-SEC-AV-Info: percona,google_mail,monitor X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk + /* + * 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 |= SXACT_FLAG_DOOMED; LWLockRelease(SerializableXactHashLock); ereport(ERROR, (errcode(ERRCODE_T_R_SERIALIZATION_FAILURE), 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. > PFA attached isolation tester and hand-wavy fix. But I suspect there are more G-items > around. 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?