grammar - src/backend/access/heap/README.tuplock

From: Brad DeJong <bpd0018(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: grammar - src/backend/access/heap/README.tuplock
Date: 2018-07-21 16:34:40
Message-ID: CAJnrtnxrA4FqZi0Z6kGPQKMiZkWv2xxgSDQ+hv1jDrf8WCKjjw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

The sentences in question currently read ...

Finally, SELECT FOR KEY SHARE obtains a shared lock which only
prevents tuple removal and modifications of key fields. This last mode
implements a mode just strong enough to implement RI checks, i.e. it ensures
that tuples do not go away from under a check, without blocking when some
other transaction that want to update the tuple without changing its key.

The last sentence is the problem, the first is just for context.

1) "This last mode implements a mode ..." seems awkward and the term "mode"
is not used to describe the other 3 levels of tuple locking strength. The
phrasing
used for SELECT FOR UPDATE ("This is the lock level that ...") is better.

2) noun/verb agreement
... transaction that want ...
should be either
... transaction that wants ... or ... transactions that want ...

3) mismatched clauses
... without blocking when ... transactions that want ...
should be either
... without blocking ... transactions that want ...
or
... without blocking when ... transactions want ...

The first says that our transaction's shared lock is not blocking other
transactions.

4) the "some other" in "some other transaction" just seems unnecessary.

Putting it all together, the attached patch changes the last sentence to ...

This lock level is just strong enough to implement RI checks, i.e. it
ensures
that tuples do not go away from under a check, without blocking transactions
that want to update the tuple without changing its key.

Attachment Content-Type Size
README.tuplock.patch application/octet-stream 1.1 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?= 2018-07-21 16:47:00 Re: Non-portable shell code in pg_upgrade tap tests
Previous Message Tom Lane 2018-07-21 15:29:27 Re: Non-portable shell code in pg_upgrade tap tests