Re: BUG #16036: Segmentation fault while doing an update
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Антон Власов <druidvav@gmail.com>, pgsql-bugs@lists.postgresql.org
Date: 2019-10-04T03:36:10Z
Lists: pgsql-bugs
Hi, On 2019-10-03 23:26:01 -0400, Tom Lane wrote: > Andres Freund <andres@anarazel.de> writes: > > So I think what we need to do is: > > 1) only call ExecCopySlot() if slot != newslot - this fixes the crash > > 2) Add an assert to ExecCopySlot() ensuring source and target slot are > > distinct > > 3) Figure out why our tests didn't catch this, this afaict should be a > > tested scenario > > 4) Fix confusing variable naming around newSlot/newslot in ExecBRUpdateTriggers > > Maybe instead of 1+2, change ExecCopySlot like this: > > - dstslot->tts_ops->copyslot(dstslot, srcslot); > + if (dstslot != srcslot) > + dstslot->tts_ops->copyslot(dstslot, srcslot); > > That would fix other similar instances, not just this one caller. Yea, I was wondering about that too - but asking for a slot to be copied into itself seems to indicate a logic bug more often than not? Expecting the slots to be independent, afterwards. So I'm a bit hesitant doing so. Greetings, Andres Freund
Commits
-
Disable one more set of tests from c8841199509.
- 04a4c03efe3e 9.6.16 landed
- 2212e01316ff 10.11 landed
- 77b2d95b1485 11.6 landed
- 9051f62ed7ef 12.1 landed
- 3a68105154c3 13.0 landed
-
Disable one set of tests from c8841199509.
- e25847b471e2 9.6.16 landed
- 81b8cd5ed7c0 10.11 landed
- 5711a1828f1f 11.6 landed
- bbd26778643f 12.1 landed
- 6e61d75f5258 13.0 landed
-
Add isolation tests for the combination of EPQ and triggers.
- 04619f508fbf 9.6.16 landed
- 95266e64c5b7 10.11 landed
- 54b0feaf90d8 11.6 landed
- 0cbc72ca72d4 12.1 landed
- c88411995098 13.0 landed
-
Fix crash caused by EPQ happening with a before update trigger present.
- 60e97d63e5d1 12.1 landed
- d986d4e87f61 13.0 landed
-
Modify the isolation tester so that multiple sessions can wait.
- 38f8bdcac498 9.6.0 cited