diff options
author | Simon Riggs <simon@2ndQuadrant.com> | 2010-07-28 05:22:24 +0000 |
---|---|---|
committer | Simon Riggs <simon@2ndQuadrant.com> | 2010-07-28 05:22:24 +0000 |
commit | 2dbbda02e7e688311e161a912a0ce00cde9bb6fc (patch) | |
tree | adf4f2ca8c477550f19bd6362d0b6fa4ae19f68b /doc/src | |
parent | 133924e13e004db8979424bf5436e21b0a09a069 (diff) | |
download | postgresql-2dbbda02e7e688311e161a912a0ce00cde9bb6fc.tar.gz postgresql-2dbbda02e7e688311e161a912a0ce00cde9bb6fc.zip |
Reduce lock levels of CREATE TRIGGER and some ALTER TABLE, CREATE RULE actions.
Avoid hard-coding lockmode used for many altering DDL commands, allowing easier
future changes of lock levels. Implementation of initial analysis on DDL
sub-commands, so that many lock levels are now at ShareUpdateExclusiveLock or
ShareRowExclusiveLock, allowing certain DDL not to block reads/writes.
First of number of planned changes in this area; additional docs required
when full project complete.
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/mvcc.sgml | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/doc/src/sgml/mvcc.sgml b/doc/src/sgml/mvcc.sgml index 341351e46ff..e72a32c58ee 100644 --- a/doc/src/sgml/mvcc.sgml +++ b/doc/src/sgml/mvcc.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/mvcc.sgml,v 2.75 2010/05/03 15:35:30 alvherre Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/mvcc.sgml,v 2.76 2010/07/28 05:22:24 sriggs Exp $ --> <chapter id="mvcc"> <title>Concurrency Control</title> @@ -532,7 +532,7 @@ SELECT SUM(value) FROM mytab WHERE class = 2; most <productname>PostgreSQL</productname> commands automatically acquire locks of appropriate modes to ensure that referenced tables are not dropped or modified in incompatible ways while the - command executes. (For example, <command>ALTER TABLE</> cannot safely be + command executes. (For example, <command>TRUNCATE</> cannot safely be executed concurrently with other operations on the same table, so it obtains an exclusive lock on the table to enforce that.) </para> @@ -695,8 +695,9 @@ SELECT SUM(value) FROM mytab WHERE class = 2; </para> <para> - This lock mode is not automatically acquired by any - <productname>PostgreSQL</productname> command. + Acquired by <command>CREATE TRIGGER</command>, + <command>CREATE RULE</command> (except for <literal>ON SELECT</> + rules) and in some cases <command>ALTER TABLE</command>. </para> </listitem> </varlistentry> @@ -742,11 +743,12 @@ SELECT SUM(value) FROM mytab WHERE class = 2; </para> <para> - Acquired by the <command>ALTER TABLE</command>, <command>DROP - TABLE</command>, <command>TRUNCATE</command>, <command>REINDEX</command>, + Acquired by the <command>DROP TABLE</command>, + <command>TRUNCATE</command>, <command>REINDEX</command>, <command>CLUSTER</command>, and <command>VACUUM FULL</command> - commands. This is also the default lock mode for <command>LOCK - TABLE</command> statements that do not specify a mode explicitly. + commands, as well as most variants of <command>ALTER TABLE</>. + This is also the default lock mode for <command>LOCK TABLE</command> + statements that do not specify a mode explicitly. </para> </listitem> </varlistentry> |