[HACKERS] ? potential bug in LockBuffer ?

2001-05-22 Thread Mauricio Breternitz
Folks: As I study the source of LockBuffer in bufmgr.c I came across the following code snippet for the case of releasing a shared (read) lock: if (mode == BUFFER_LOCK_UNLOCK) { if (*buflock BL_R_LOCK) {

RE: [HACKERS] ? potential bug in LockBuffer ?

2001-05-22 Thread Mikheev, Vadim
(buf-r_locks)--; if (!buf-r_locks) *buflock = ~BL_R_LOCK; Or I am missing something... buflock is per-backend flag, it's not in shmem. Backend is allowed only single lock per buffer. Vadim