Lock conflict

From: 席冲(宜穆) <xichong(dot)xc(at)alibaba-inc(dot)com>
To: "pgsql-hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Lock conflict
Date: 2023-03-20 01:58:01
Message-ID: 2db0313d-7097-4b95-b4a3-02dea4d65c5a.xichong.xc@alibaba-inc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello all,
This PostgreSQL version is 11.9.
In LockAcquireExtended(), why if lock requested conflicts with locks requested by waiters, must join
wait queue. Why does the lock still check for conflict with the lock requested,
rather than check for directly with conflict with the already-held lock?
I think lock requested only check for conflict with already-held lock, if there is no conflict, the lock should be granted.
Best regards

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2023-03-20 02:12:23 Re: Lock conflict
Previous Message wangw.fnst@fujitsu.com 2023-03-20 00:53:56 RE: Data is copied twice when specifying both child and parent table in publication