summaryrefslogtreecommitdiff
path: root/src/tutorial/complex.source
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2019-11-01 22:38:51 +0900
committerMichael Paquier <michael@paquier.xyz>2019-11-01 22:38:51 +0900
commit61f23839257d8260664d0af0ff82cc3dd2b46786 (patch)
treed1bc6d994d4e5f30e66906fb3f6e84b60b9d19c5 /src/tutorial/complex.source
parent3b24cf732e1746f84271f3a4f84288d146203cc3 (diff)
Fix race condition at backend exit when deleting element in syncrep queue
When a backend exits, it gets deleted from the syncrep queue if present. The queue was checked without SyncRepLock taken in exclusive mode, so it would have been possible for a backend to remove itself after a WAL sender already did the job. Fix this issue based on a suggestion from Fujii Masao, by first checking the queue without the lock. Then, if the backend is present in the queue, take the lock and perform an additional lookup check before doing the element deletion. Author: Dongming Liu Reviewed-by: Kyotaro Horiguchi, Fujii Masao, Michael Paquier Discussion: https://postgr.es/m/a0806273-8bbb-43b3-bbe1-c45a58f6ae21.lingce.ldm@alibaba-inc.com Backpatch-through: 9.4
Diffstat (limited to 'src/tutorial/complex.source')
0 files changed, 0 insertions, 0 deletions