From: Peter Eisentraut Date: Wed, 27 Mar 2002 02:36:51 +0000 (+0000) Subject: Improve spelling of lock names, and some other editing. X-Git-Tag: REL7_3~1827 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e68eb63e8cca8ebe7516b528f82c9e673fa4d230;p=postgresql Improve spelling of lock names, and some other editing. --- diff --git a/doc/src/sgml/mvcc.sgml b/doc/src/sgml/mvcc.sgml index 69c73a67ff..fddeb679c8 100644 --- a/doc/src/sgml/mvcc.sgml +++ b/doc/src/sgml/mvcc.sgml @@ -1,5 +1,5 @@ @@ -376,24 +376,28 @@ ERROR: Can't serialize access due to concurrent update - PostgreSQL - provides various lock modes to control concurrent - access to data in tables. Some of these lock modes are acquired by - PostgreSQL - automatically before statement execution, while others are - provided to be used by applications. All lock modes acquired in a - transaction are held for the duration - of the transaction. + PostgreSQL provides various lock modes + to control concurrent access to data in tables. Users normally + need not be concerned about the different lock modes because + PostgreSQL commands automatically + acquire locks of appropriate modes to ensure data integrity while + permitting an appropriate level of concurrent access. + Nevertheless, a user can manually lock a table in any of the + available modes using the LOCK TABLE command. - - Table-level locks + + The list below shows the available lock modes and the contexts in + which they are used. Remember that all of these lock modes are + table-level locks, even if the name contains the word + row. The names of the lock modes are historical. + - + Table-level lock modes - AccessShareLock + ACCESS SHARE @@ -402,139 +406,141 @@ ERROR: Can't serialize access due to concurrent update - Conflicts with AccessExclusiveLock only. + Conflicts with the ACCESS EXCLUSIVE lock + mode only. - RowShareLock + ROW SHARE - Acquired by SELECT FOR UPDATE - and LOCK TABLE - statements. + The SELECT FOR UPDATE command acquires a + lock of this mode. - Conflicts with ExclusiveLock and AccessExclusiveLock modes. + Conflicts with the EXCLUSIVE and + ACCESS EXCLUSIVE lock modes. - RowExclusiveLock + ROW EXCLUSIVE - Acquired by UPDATE, DELETE, - INSERT and LOCK TABLE - statements. + The commands UPDATE, + DELETE, and INSERT + automatically acquire this lock mode. - Conflicts with ShareLock, ShareRowExclusiveLock, ExclusiveLock and - AccessExclusiveLock modes. + Conflicts with the SHARE, SHARE ROW + EXCLUSIVE, EXCLUSIVE, and + ACCESS EXCLUSIVE lock modes. - ShareUpdateExclusiveLock + SHARE UPDATE EXCLUSIVE - Acquired by VACUUM (without ) - and LOCK TABLE - - statements. + Acquired by VACUUM (without ). - Conflicts with ShareUpdateExclusiveLock, ShareLock, - ShareRowExclusiveLock, ExclusiveLock and AccessExclusiveLock modes. + Conflicts with the SHARE UPDATE EXCLUSIVE, + SHARE, SHARE ROW + EXCLUSIVE, EXCLUSIVE, and + ACCESS EXCLUSIVE lock modes. - ShareLock + SHARE - Acquired by CREATE INDEX - and LOCK TABLE - - statements. + Acquired by CREATE INDEX. - Conflicts with RowExclusiveLock, ShareUpdateExclusiveLock, - ShareRowExclusiveLock, - ExclusiveLock and AccessExclusiveLock modes. + Conflicts with the ROW EXCLUSIVE, + SHARE UPDATE EXCLUSIVE, SHARE ROW + EXCLUSIVE, EXCLUSIVE, and + ACCESS EXCLUSIVE lock modes. - ShareRowExclusiveLock + SHARE ROW EXCLUSIVE - Acquired by LOCK TABLE - statements. + This lock mode is not automatically acquired by any command. - Conflicts with RowExclusiveLock, ShareUpdateExclusiveLock, - ShareLock, ShareRowExclusiveLock, - ExclusiveLock and AccessExclusiveLock modes. + Conflicts with the ROW EXCLUSIVE, + SHARE UPDATE EXCLUSIVE, + SHARE, SHARE ROW + EXCLUSIVE, EXCLUSIVE, and + ACCESS EXCLUSIVE lock modes. - ExclusiveLock + EXCLUSIVE LOCK - Acquired by LOCK TABLE - statements. + This lock mode is not automatically acquired by any command. - Conflicts with RowShareLock, RowExclusiveLock, - ShareUpdateExclusiveLock, ShareLock, - ShareRowExclusiveLock, ExclusiveLock and AccessExclusiveLock - modes. + Conflicts with the ROW SHARE, ROW + EXCLUSIVE, SHARE UPDATE + EXCLUSIVE, SHARE, SHARE + ROW EXCLUSIVE, EXCLUSIVE, and + ACCESS EXCLUSIVE lock modes. - AccessExclusiveLock + ACCESS EXCLUSIVE - Acquired by ALTER TABLE, - DROP TABLE, - VACUUM FULL and LOCK TABLE - (or plain - LOCK TABLE) statements. + Acquired by the ALTER TABLE, DROP + TABLE, and VACUUM FULL commands. + This is also the default lock mode for LOCK TABLE + statements that do not specify a mode explicitly. - Conflicts with all modes (AccessShareLock, RowShareLock, - RowExclusiveLock, ShareUpdateExclusiveLock, ShareLock, - ShareRowExclusiveLock, ExclusiveLock and AccessExclusiveLock). + Conflicts with locks of all modes ( ACCESS + SHARE, ROW SHARE, ROW + EXCLUSIVE, SHARE UPDATE + EXCLUSIVE, SHARE, SHARE + ROW EXCLUSIVE, EXCLUSIVE, and + ACCESS EXCLUSIVE). @@ -542,30 +548,27 @@ ERROR: Can't serialize access due to concurrent update - Only AccessExclusiveLock blocks SELECT (without - ) statement. + Only an ACCESS EXCLUSIVE lock blocks a + SELECT (without ) + statement. - - - - - Row-level locks - Row-level locks are acquired when rows are being updated (or deleted or - marked for update). - Row-level locks don't affect data querying. They block - writers to the same row only. + In addition to table-level locks, there are row-level locks. + Row-level locks are acquired when rows are being updated (or + deleted or marked for update). Row-level locks don't affect data + querying; they block writers to the same row + only. Row-level locks cannot be acquired explicitly by the user. - PostgreSQL - doesn't remember any information about modified rows in memory and - so has no limit to the number of rows locked at one time. However, - locking a row may cause a disk write; thus, for example, - SELECT FOR UPDATE will modify - selected rows to mark them and so will result in disk writes. + PostgreSQL doesn't remember any + information about modified rows in memory, so is has no limit to + the number of rows locked at one time. However, locking a row + may cause a disk write; thus, for example, SELECT FOR + UPDATE will modify selected rows to mark them and so + will result in disk writes. @@ -575,7 +578,6 @@ ERROR: Can't serialize access due to concurrent update updated. Application writers normally need not be concerned with page-level locks, but we mention them for completeness. -