diff options
author | Andres Freund <andres@anarazel.de> | 2020-08-19 18:19:52 -0700 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2020-08-19 18:24:33 -0700 |
commit | 1fe1f42e3e85279e1cb8b004b3b076a04bde4cee (patch) | |
tree | 716bd049bed8d5f64568ee1e069095b820ffa78b /src/backend/parser/parse_utilcmd.c | |
parent | 20729324078055a4d9654fc5af9570fe625786a5 (diff) | |
download | postgresql-1fe1f42e3e85279e1cb8b004b3b076a04bde4cee.tar.gz postgresql-1fe1f42e3e85279e1cb8b004b3b076a04bde4cee.zip |
Acquire ProcArrayLock exclusively in ProcArrayClearTransaction.
This corrects an oversight by me in 20729324078, which made
ProcArrayClearTransaction() increment xactCompletionCount. That requires an
exclusive lock, obviously.
There's other approaches that avoid the exclusive acquisition, but given that a
2PC commit is fairly heavyweight, it doesn't seem worth doing so. I've not been
able to measure a performance difference, unsurprisingly. I did add a
comment documenting that we could do so, should it ever become a bottleneck.
Reported-By: Tom Lane <tgl@sss.pgh.pa.us>
Author: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/1355915.1597794204@sss.pgh.pa.us
Diffstat (limited to 'src/backend/parser/parse_utilcmd.c')
0 files changed, 0 insertions, 0 deletions