Re: BUG #17607: Server process crashes when PLpgSQL function raises error in subtransaction

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: thomas.d.mckay@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2022-09-25T20:34:05Z
Lists: pgsql-bugs

Attachments

... and after yet more poking at it, I see why c5b7ba4e6 masked
the problem: it added an optimization such that we don't use the
storeslot at all unless a tuple mapping conversion is required.
That led me to the test case shown in the attached, which exhibits
this symptom in all branches since v12.

I had been planning to let this wait until after 15rc1 wrap,
but now that I have evidence that the bug is still live in v15,
I'm going to go ahead and push.  Both components of the fix
seem like extremely safe changes, even for the day before wrap.

			regards, tom lane

Commits

  1. Fix tupdesc lifespan bug with AfterTriggersTableData.storeslot.