On Fri, Jul 28, 2023 at 11:07:49AM +0530, Bharath Rupireddy wrote: > Why to block multiple readers (if at all there exists any), with > LWLockHeldByMeInMode(..., LW_EXCLUSIVE)? I think > Assert(LWLockHeldByMe(AddinShmemInitLock)); suffices in > GetNamedLWLockTranche.
I am not sure to follow this argument. Why would it make sense for anybody to use that in shared mode? We document that the exclusive mode is required because we retrieve the lock position in shmem that an extension needs to know about when it initializes its own shmem state, and that cannot be done safely without LW_EXCLUSIVE. Any extension I can find in https://codesearch.debian.net/ does that as well. -- Michael
signature.asc
Description: PGP signature