Re: BUG #15727: PANIC: cannot abort transaction 295144144, it wasalready committed - Mailing list pgsql-bugs

From Andres Freund
Subject Re: BUG #15727: PANIC: cannot abort transaction 295144144, it wasalready committed
Date
Msg-id 20190407203315.6v3iktksr5u3bksw@alap3.anarazel.de
Whole thread Raw
In response to Re: BUG #15727: PANIC: cannot abort transaction 295144144, it wasalready committed  (Andres Freund <andres@anarazel.de>)
List pgsql-bugs
Hi,

On 2019-04-06 16:10:37 -0700, Andres Freund wrote:
> On 2019-04-06 10:10:25 -0700, Andres Freund wrote:
> > I noticed that we say
> > +                                ereport(ERROR,
> > +                                        (errcode(ERRCODE_TRIGGERED_DATA_CHANGE_VIOLATION),
> > +                                         errmsg("tuple to be updated was already modified by an operation
triggeredby the current command"),
 
> > 
> > in the ExecDelete() case (that's not new). Which seems odd.
> 
> My inclination is to fix this in master, but not backpatch. I did in the
> current version of the patch, because it made it easier to verify my
> tests actually work.

Attached patch does so.


> One bigger question, around precisely that error, I have is that fixing
> this bug led me to add tests for the codepath. What I noticed is that
> the current version of the patch detects the above error even if we
> first have to follow the update chain, whereas previously that case was
> just blindly ignored. Which seems hard to defend to me?
>
> [ long explanation ]
> It seems mighty finnicky to fix this in < v12 (as the error would need
> to happen in the guts of EvalPlanQualFetch() rather than in
> ExecUpdate/Delete) - so I'm inclined to just fix it in master.

Attached patch now errors out.


Patch with tests attached.  Tom, any chance you could comment on whether
you think it's sensible to make these behaviour changes in master, but
not backpatch?

Greetings,

Andres Freund

Attachment

pgsql-bugs by date:

Previous
From: Andres Freund
Date:
Subject: Re: BUG #15727: PANIC: cannot abort transaction 295144144, it wasalready committed
Next
From: PG Bug reporting form
Date:
Subject: BUG #15739: PgAdmin4 4.4 does not work with latest psycopg2 (2.8.1)