postgresql/src/backend/storage
Andres Freund 1fe1f42e3e Acquire ProcArrayLock exclusively in ProcArrayClearTransaction.
This corrects an oversight by me in 2072932407, 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
2020-08-19 18:24:33 -07:00
..
buffer Correct several behavior descriptions in comments. 2020-08-15 20:21:52 -07:00
file Fix error message. 2020-07-23 21:10:49 +12:00
freespace Cache smgrnblocks() results in recovery. 2020-07-31 14:29:52 +12:00
ipc Acquire ProcArrayLock exclusively in ProcArrayClearTransaction. 2020-08-19 18:24:33 -07:00
large_object Remove utils/acl.h from catalog/objectaddress.h 2020-03-10 10:27:00 +01:00
lmgr Prevent concurrent SimpleLruTruncate() for any given SLRU. 2020-08-15 10:15:53 -07:00
page code: replace 'master' with 'primary' where appropriate. 2020-07-08 12:57:23 -07:00
smgr Cache smgrnblocks() results in recovery. 2020-07-31 14:29:52 +12:00
sync Use correct and consistent unit abbreviation 2020-06-01 21:18:36 +02:00
Makefile Refactor the fsync queue for wider use. 2019-04-04 23:38:38 +13:00