summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pl/plpgsql/src/pl_exec.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c
index db994a6cdf6..86ec26afa54 100644
--- a/src/pl/plpgsql/src/pl_exec.c
+++ b/src/pl/plpgsql/src/pl_exec.c
@@ -6918,7 +6918,9 @@ plpgsql_xact_cb(XactEvent event, void *arg)
* expect the regular abort recovery procedures to release everything of
* interest.
*/
- if (event == XACT_EVENT_COMMIT || event == XACT_EVENT_PREPARE)
+ if (event == XACT_EVENT_COMMIT ||
+ event == XACT_EVENT_PARALLEL_COMMIT ||
+ event == XACT_EVENT_PREPARE)
{
/* Shouldn't be any econtext stack entries left at commit */
Assert(simple_econtext_stack == NULL);
@@ -6927,7 +6929,8 @@ plpgsql_xact_cb(XactEvent event, void *arg)
FreeExecutorState(shared_simple_eval_estate);
shared_simple_eval_estate = NULL;
}
- else if (event == XACT_EVENT_ABORT)
+ else if (event == XACT_EVENT_ABORT ||
+ event == XACT_EVENT_PARALLEL_ABORT)
{
simple_econtext_stack = NULL;
shared_simple_eval_estate = NULL;