aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/basics.source
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2020-03-26 18:06:55 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2020-03-26 18:06:55 -0400
commit86e5badd22d9ae131a2badb87acdbb20e41811a2 (patch)
tree08bd303a5a72e2b3ccf24d487e4796cedab564af /src/tutorial/basics.source
parenteff5b245df259c73d8342e2f04dba5a832d2ea0a (diff)
downloadpostgresql-86e5badd22d9ae131a2badb87acdbb20e41811a2.tar.gz
postgresql-86e5badd22d9ae131a2badb87acdbb20e41811a2.zip
Ensure that plpgsql cleans up cleanly during parallel-worker exit.
plpgsql_xact_cb ought to treat events XACT_EVENT_PARALLEL_COMMIT and XACT_EVENT_PARALLEL_ABORT like XACT_EVENT_COMMIT and XACT_EVENT_ABORT respectively, since its goal is to do process-local cleanup. This oversight caused plpgsql's end-of-transaction cleanup to not get done in parallel workers. Since a parallel worker will exit just after the transaction cleanup, the effects of this are limited. I couldn't find any case in the core code with user-visible effects, but perhaps there are some in extensions. In any case it's wrong, so let's fix it before it bites us not after. In passing, add some comments around the handling of expression evaluation resources in DO blocks. There's no live bug there, but it's quite unobvious what's happening; at least I thought so. This isn't related to the other issue, except that I found both things while poking at expression-evaluation performance. Back-patch the plpgsql_xact_cb fix to 9.5 where those event types were introduced, and the DO-block commentary to v11 where DO blocks gained the ability to issue COMMIT/ROLLBACK. Discussion: https://postgr.es/m/10353.1585247879@sss.pgh.pa.us
Diffstat (limited to 'src/tutorial/basics.source')
0 files changed, 0 insertions, 0 deletions