| From: | Andrey Borodin <x4mmm(at)yandex-team(dot)ru> |
|---|---|
| To: | Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> |
| Cc: | PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Possible G2-item at SERIALIZABLE |
| Date: | 2026-06-02 08:18:29 |
| Message-ID: | 92417390-9753-4F6D-AE30-DA10FFF2A4DA@yandex-team.ru |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
> On 2 Jun 2026, at 03:00, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> wrote:
>
> + /*
> + * 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?
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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Mats Rydberg | 2026-06-02 08:48:32 | GREATEST/LEAST ignores comparison operator volatility in contain_volatile_functions_walker |
| Previous Message | Никита Калинин | 2026-06-02 02:39:26 | Re: BUG #19500: pgrepack logical decoding plugin can crash assert builds via SQL decoding API |