Lock conflict - Mailing list pgsql-hackers

From 席冲(宜穆)
Subject Lock conflict
Date
Msg-id 2db0313d-7097-4b95-b4a3-02dea4d65c5a.xichong.xc@alibaba-inc.com
Whole thread Raw
Responses Re: Lock conflict  (David Rowley <dgrowleyml@gmail.com>)
List 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



pgsql-hackers by date:

Previous
From: "wangw.fnst@fujitsu.com"
Date:
Subject: RE: Data is copied twice when specifying both child and parent table in publication
Next
From: David Rowley
Date:
Subject: Re: Lock conflict