mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-23 19:39:53 +08:00
Reword text on ROW SHARE lock as acquired by SELECT FOR <lock>
It was missing lock levels FOR KEY SHARE and FOR NO KEY EXCLUSIVE; but also SELECT FOR UPDATE is not a command separate from SELECT, as the original text implied. It is clearer to state that FOR <lock strength> is an option of regular SELECT. Per suggestion from Joey Bodoia <jbodoia21@cmc.edu> Reviewed-by: Joey Bodoia <jbodoia21@cmc.edu> (offlist) Reviewed-by: Erikjan Rijkers <er@xs4all.nl> Discussion: https://postgr.es/m/164908765512.682.17348032020747341013@wrigleys.postgresql.org
This commit is contained in:
parent
5bb2b6abc8
commit
275e719d91
@ -932,12 +932,14 @@ ERROR: could not serialize access due to read/write dependencies among transact
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <command>SELECT FOR UPDATE</command> and
|
||||
<command>SELECT FOR SHARE</command> commands acquire a
|
||||
lock of this mode on the target table(s) (in addition to
|
||||
<literal>ACCESS SHARE</literal> locks on any other tables
|
||||
that are referenced but not selected
|
||||
<option>FOR UPDATE/FOR SHARE</option>).
|
||||
The <command>SELECT</command> command acquires a lock of this mode
|
||||
on all tables on which one of the <option>FOR UPDATE</option>,
|
||||
<option>FOR NO KEY UPDATE</option>,
|
||||
<option>FOR SHARE</option>, or
|
||||
<option>FOR KEY SHARE</option> options is specified
|
||||
(in addition to <literal>ACCESS SHARE</literal> locks on any other
|
||||
tables that are referenced without any explicit
|
||||
<option>FOR ...</option> locking option).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
Loading…
Reference in New Issue
Block a user