Clarify what is protected by WaitLSNLock
authorAlexander Korotkov <akorotkov@postgresql.org>
Sat, 6 Apr 2024 21:32:35 +0000 (00:32 +0300)
committerAlexander Korotkov <akorotkov@postgresql.org>
Sat, 6 Apr 2024 21:49:53 +0000 (00:49 +0300)
commitee79928441e7e291532b833455ebfee27d7cab5c
treebc8115da4fbef2a910f5f45531b21c9095b716bb
parent25f42429e2ff2acca35c9154fc2e36b75c79227a
Clarify what is protected by WaitLSNLock

Not just WaitLSNState.waitersHeap, but also WaitLSNState.procInfos and
updating of WaitLSNState.minWaitedLSN is protected by WaitLSNLock.  There
is one now documented exclusion on fast-path checking of
WaitLSNProcInfo.inHeap flag.

Discussion: https://postgr.es/m/202404030658.hhj3vfxeyhft%40alvherre.pgsql
src/backend/commands/waitlsn.c
src/include/commands/waitlsn.h