"ipig" <ipig(at)ercist(dot)iscas(dot)ac(dot)cn> writes:
> In your example, it seems that process B is the first such waiter( the request of B conflicts AccessShareLock).
No. Better go study
http://developer.postgresql.org/docs/postgres/explicit-locking.html#LOCKING-TABLES
After looking at the example again, consider the further assumption
that C already has AccessShareLock (which is certainly a valid
configuration). Then A *must* queue between C and D; there is no
other valid order to grant the requests in.
regards, tom lane