Re: BUG #15727: PANIC: cannot abort transaction 295144144, it was already committed
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: r.zharkov@postgrespro.ru, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>, Alvaro Herrera <alvherre@2ndquadrant.com>, pgsql-bugs@lists.postgresql.org
Date: 2019-04-07T20:33:15Z
Lists: pgsql-bugs
Attachments
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 triggered by 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
Commits
-
Fix GetNewTransactionId()'s interaction with xidVacLimit.
- f7feb020c3d8 12.0 landed
-
Fix example in comment.
- 16954e22e2a8 12.0 cited
-
Fix EvalPlanQualStart to handle partitioned result rels correctly.
- 1b5bbe4bcc91 10.8 landed
- b291488da513 11.3 landed
- a8cb8f124679 12.0 landed
-
Fix a number of issues around modifying a previously updated row.
- 41f5e04aec6c 12.0 landed
-
Use FullTransactionId for the transaction stack.
- ad308058cc86 12.0 cited
-
Add basic infrastructure for 64 bit transaction IDs.
- 2fc7af5e9660 12.0 cited
-
tableam: Add tuple_{insert, delete, update, lock} and use.
- 5db6df0c0117 12.0 cited
-
Throw error if expiring tuple is again updated or deleted.
- 6868ed7491b7 9.3.0 cited