diff options
author | Michael Paquier <michael@paquier.xyz> | 2024-06-28 12:31:29 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2024-06-28 12:31:29 +0900 |
commit | d85fc4be11b38afd6d3abb586a6799299ed29470 (patch) | |
tree | 450bed4b8be43c075955fcbaafde0aaf9e10049c /src/backend/jit/llvm/llvmjit_expr.c | |
parent | 4a7f91b3d3141e8898211a5b145b3c210b05c288 (diff) | |
download | postgresql-d85fc4be11b38afd6d3abb586a6799299ed29470.tar.gz postgresql-d85fc4be11b38afd6d3abb586a6799299ed29470.zip |
Improve locking around InjectionPointRun()
As coded, an injection point could be loaded into the local cache
without the LWLock InjectionPointLock taken, hence a point detached and
re-attached concurrently of a point running calling InjectionPointRun()
may finish by loading a callback it did no set initially. Based on all
the cases discussed until now on the lists, it is fine to delay the lock
release until the callback is run, so let's do that.
While on it, remove a useless LWLockRelease() called before an error in
InjectionPointAttach().
Per discussion with Heikki Linnakangas and Noah Misch.
Discussion: https://postgr.es/m/e1ffb822-054e-4006-ac06-50532767f75b@iki.fi
Diffstat (limited to 'src/backend/jit/llvm/llvmjit_expr.c')
0 files changed, 0 insertions, 0 deletions