Minor edits to README.tuplock, and a question - Mailing list pgsql-hackers

From Gurjeet Singh
Subject Minor edits to README.tuplock, and a question
Date
Msg-id D8TEDI0JBT4W.1219VGKNDNOTG@singh.im
Whole thread Raw
List pgsql-hackers
Please see attached a few minor edits to README.tuplock, which I feel
make an improvement over the current version.

Reading through that, though, I could not see a functional difference
between FOR NO KEY UPDATE and FOR KEY SHARE mode of locks. I understand
they are of different strength, exclusive vs. shared, but the way the
text (quoted below) describes them, they essentially both achieve the
same effect.

> SELECT FOR NO
> KEY UPDATE likewise obtains an exclusive lock, but only prevents tuple removal
> and modifications which might alter the tuple's key.

> SELECT FOR KEY SHARE obtains a shared lock which only
> prevents tuple removal and modifications of key fields.

Am I missing something?

<reads some more of the file>

Nevermind. Deciphering the conflict table below it makes clear the need
for similar looking locks, but with exclusive vs. shared mode
differences. I can't think of an improvement in the two sentences quoted
above, but perhaps others can think of something that helps the reader.

--
Best regards,
Gurjeet
http://Gurje.et

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Amcheck verification of GiST and GIN
Next
From: Alexander Lakhin
Date:
Subject: The 026_overwrite_contrecord test might fail on extremely slow animals