explicit-locking.html "key values" reference

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: pgsql-general list <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: explicit-locking.html "key values" reference
Date: 2023-05-27 03:02:32
Message-ID: CACJufxHjxR5F5rbZJw1ubE+ykt65mqvVZFPoCfzAKMN06YN-gQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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 that
> changes the key values, but not other UPDATE, and neither does it prevent SELECT
> FOR NO KEY UPDATE, SELECT FOR SHARE, or SELECT FOR KEY SHARE.

A key-shared lock blocks other transactions from performing DELETE or any
> UPDATE that changes the key values

querya: select col1,col2,col3 from a for key share of a
Does "the key values" refer to these rows returned by the querya?
I still feel confused about "the key values".

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2023-05-27 03:20:31 Re: explicit-locking.html "key values" reference
Previous Message Atul Kumar 2023-05-26 21:46:39 Query to find RDS endpoint