diff options
| author | Simon Riggs <simon@2ndQuadrant.com> | 2012-04-06 10:21:40 +0100 |
|---|---|---|
| committer | Simon Riggs <simon@2ndQuadrant.com> | 2012-04-06 10:21:40 +0100 |
| commit | 8cb53654dbdb4c386369eb988062d0bbb6de725e (patch) | |
| tree | e422c04c90b21ae2c4180f796297a4a5ef509f38 /doc/src | |
| parent | 21cc529698c8d10c6f7c76874d4adc98d27c6187 (diff) | |
Add DROP INDEX CONCURRENTLY [IF EXISTS], uses ShareUpdateExclusiveLock
Diffstat (limited to 'doc/src')
| -rw-r--r-- | doc/src/sgml/ref/drop_index.sgml | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/doc/src/sgml/ref/drop_index.sgml b/doc/src/sgml/ref/drop_index.sgml index 7177ef2d81b..343f7aca003 100644 --- a/doc/src/sgml/ref/drop_index.sgml +++ b/doc/src/sgml/ref/drop_index.sgml @@ -21,7 +21,7 @@ PostgreSQL documentation <refsynopsisdiv> <synopsis> -DROP INDEX [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> [, ...] [ CASCADE | RESTRICT ] +DROP INDEX [ CONCURRENTLY ] [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> [, ...] [ CASCADE | RESTRICT ] </synopsis> </refsynopsisdiv> @@ -50,6 +50,29 @@ DROP INDEX [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> [, .. </varlistentry> <varlistentry> + <term><literal>CONCURRENTLY</literal></term> + <listitem> + <para> + When this option is used, <productname>PostgreSQL</> will drop the + index without taking any locks that prevent concurrent selects, inserts, + updates, or deletes on the table; whereas a standard index drop + waits for a lock that locks out everything on the table until it's done. + Concurrent drop index is a two stage process. First, we mark the index + both invalid and not ready then commit the change. Next we wait until + there are no users locking the table who can see the index. + </para> + <para> + There are several caveats to be aware of when using this option. + Only one index name can be specified if the <literal>CONCURRENTLY</literal> + parameter is specified. Regular <command>DROP INDEX</> command can be + performed within a transaction block, but + <command>DROP INDEX CONCURRENTLY</> cannot. + The CASCADE option is not supported when dropping an index concurrently. + </para> + </listitem> + </varlistentry> + + <varlistentry> <term><replaceable class="PARAMETER">name</replaceable></term> <listitem> <para> |
