From: Bruce Momjian Date: Sun, 18 Feb 2007 01:21:49 +0000 (+0000) Subject: Update "Conflicting lock modes" to show as conflict, add X-Git-Tag: REL8_3_BETA1~1186 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9b9cd9c20571536dadaa90f1e0561dd4692bc2f0;p=postgresql Update "Conflicting lock modes" to show as conflict, add current/requested headings, add link to table from text. --- diff --git a/doc/src/sgml/mvcc.sgml b/doc/src/sgml/mvcc.sgml index 19e068e4ff..5785811c6e 100644 --- a/doc/src/sgml/mvcc.sgml +++ b/doc/src/sgml/mvcc.sgml @@ -1,4 +1,4 @@ - + Concurrency Control @@ -536,7 +536,8 @@ SELECT SUM(value) FROM mytab WHERE class = 2; To some extent the names reflect the typical usage of each lock mode — but the semantics are all the same. The only real difference between one lock mode and another is the set of lock modes with - which each conflicts. Two transactions cannot hold locks of conflicting + which each conflicts (see ). + . Two transactions cannot hold locks of conflicting modes on the same table at the same time. (However, a transaction never conflicts with itself. For example, it might acquire ACCESS EXCLUSIVE lock and later acquire @@ -741,119 +742,118 @@ SELECT SUM(value) FROM mytab WHERE class = 2; releases locks acquired within it. + + - Compatibility of lock modes + Conflicting lock modes - - - - - - - - - + + + - Modes - AS - RS - RE - SUE - S - SRE - E - AE + Requested Lock Mode + Current Lock Mode + + + ACCESS SHARE + ROW SHARE + ROW EXCLUSIVE + SHARE UPDATE EXCLUSIVE + SHARE + SHARE ROW EXCLUSIVE + EXCLUSIVE + ACCESS EXCLUSIVE - AS - Y - Y - Y - Y - Y - Y - Y - N + ACCESS SHARE + + + + + + + + X - RS - Y - Y - Y - Y - Y - Y - N - N + ROW SHARE + + + + + + + X + X - RE - Y - Y - Y - Y - N - N - N - N + ROW EXCLUSIVE + + + + + X + X + X + X - SUE - Y - Y - Y - N - N - N - N - N + SHARE UPDATE EXCLUSIVE + + + + X + X + X + X + X - S - Y - Y - N - N - Y - N - N - N + SHARE + + + X + X + + X + X + X - SRE - Y - Y - N - N - N - N - N - N + SHARE ROW EXCLUSIVE + + + X + X + X + X + X + X - E - Y - N - N - N - N - N - N - N + EXCLUSIVE + + X + X + X + X + X + X + X - AE - N - N - N - N - N - N - N - N + ACCESS EXCLUSIVE + X + X + X + X + X + X + X + X