Ajay P S <ajayps...@gmail.com> writes: > However, I see that in the heap_update(heapam.c) function there is a > brief interval(Lock and unlock the buffer) where a writer may block > readers if the writer is updating the same row which readers are > reading. > Could anyone please help me with the below query?
> 1) Is my understanding correct? In so, Is it not against the > statements "readers does not block writers and writers does not block > readers" You should probably read that as "there are no macroscopic block conditions between readers and writers". If you want to quibble about whether a transient buffer lock violates the statement, there are doubtless hundreds of other places where there's some sort of short-term blockage. A trivial example is that just finding the buffer in the first place can be transiently blocked by spinlock or LWLock exclusion on the buffer lookup data structures. regards, tom lane