Hello, Andres!
Andres Freund <andres@anarazel.de>:
>
> As part of that introduce a new lock level in-between share and exclusive
> locks (provisionally called share-exclusive, but I hate it). The new lock
> level allows other share lockers, but can only be held by one backend.
>
> This allows to change the rules so that:
>
> 1) Share lockers are not allowed to modify buffers anymore
> 2) Hint bits need the new lock mode (conditionally upgrading the lock in SetHintBits())
> 3) Write IO needs to the new lock level
IIUC, it may be mapped to existing locking system:
BUFFER_LOCK_SHARE ----> AccessShareLock
new lock mode ----> ExclusiveLock
BUFFER_LOCK_EXCLUSIVE ----> AccessExclusiveLock
So, it all may be named:
BUFFER_LOCK_ACCESS_SHARE
BUFFER_LOCK_EXCLUSIVE
BUFFER_LOCK_ACCESS_EXCLUSIVE
being more consistent with table-level locking system.
Greetings,
Mikhail.