Re: Assertion failure in HEAD and 13 after calling COMMIT in a stored proc
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Jim Nasby <nasbyj@amazon.com>,
"pgsql-hackers@lists.postgresql.org"
<pgsql-hackers@lists.postgresql.org>
Date: 2021-06-22T15:48:46Z
Lists: pgsql-hackers
Attachments
- provide-portal-snapshot-for-simple-exprs-too.patch (text/x-diff) patch
I wrote: > Hmm. I think the real issue here is that commit 84f5c2908 did > not cover the "simple expression" code path in plpgsql. We > need to re-establish an outer snapshot when the next thing > that happens after COMMIT is a simple expression, too. The attached seems to be enough to resolve Jim's example. I'd like to invent a test case that involves a detoast of the simple expression's result, too, to show that transiently pushing a snapshot for the duration of the expression is not the right fix. regards, tom lane
Commits
-
Restore the portal-level snapshot for simple expressions, too.
- d102aafb6259 14.0 landed
- 77200c569238 11.13 landed
- 6f1321d5ae8e 13.4 landed
- 29d5d5761aa8 12.8 landed
-
Centralize the logic for protective copying of utility statements.
- 7c337b6b527b 14.0 cited
-
Restore the portal-level snapshot after procedure COMMIT/ROLLBACK.
- 84f5c2908dad 14.0 cited
-
Avoid taking a new snapshot for an immutable simple expression in plpgsql.
- 73b06cf893c9 13.0 cited