On Fri, May 26, 2023 at 8:02 PM jian he wrote:
>
> I still feel confused about "the key values".
>
The "key" here is the Foreign Key relationship. In short, FOR NO KEY
UPDATE, promises that PK/FK values on the table will not be changed. Only
non-FK/PK columns can be changed. In neither case m
hi.
https://www.postgresql.org/docs/current/explicit-locking.html
FOR KEY SHARE
> Behaves similarly to FOR SHARE, except that the lock is weaker: SELECT
> FOR UPDATE is blocked, but not SELECT FOR NO KEY UPDATE. A key-shared
> lock blocks other transactions from performing DELETE or any UPDATE tha