Clarify what is protected by WaitLSNLock

Alexander Korotkov <akorotkov@postgresql.org>

Commit: ee79928441e7e291532b833455ebfee27d7cab5c
Author: Alexander Korotkov <akorotkov@postgresql.org>
Date: 2024-04-06T21:49:53Z
Releases: 17.0
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

Files

PathChange+/−
src/backend/commands/waitlsn.c modified +8 −2
src/include/commands/waitlsn.h modified +5 −2

Discussion