aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2011-06-13 17:12:26 -0400
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2011-06-13 17:17:16 -0400
commita03feb9354bda5084f19cc952bc52ba7be89f372 (patch)
tree56ad427e9d28025136f69e368d000fe590bb8909 /doc/src
parent2202891669735242a24299f85a788a3aa0461404 (diff)
downloadpostgresql-a03feb9354bda5084f19cc952bc52ba7be89f372.tar.gz
postgresql-a03feb9354bda5084f19cc952bc52ba7be89f372.zip
Expand warnings on locks acquired by CREATE INDEX CONCURRENTLY
The previous wording wasn't explicit enough, which could misled readers into thinking that the locks acquired are more restricted in nature than they really are. The resulting optimism can be damaging to morale when confronted with reality, as has been observed in the field. Greg Smith
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/create_index.sgml11
1 files changed, 10 insertions, 1 deletions
diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index 43b6499603c..f7f360875c2 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -381,7 +381,16 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ <replaceable class="parameter">name</
<para>
In a concurrent index build, the index is actually entered into the
system catalogs in one transaction, then the two table scans occur in a
- second and third transaction.
+ second and third transaction. All active transactions at the time the
+ second table scan starts, not just ones that already involve the table,
+ have the potential to block the concurrent index creation until they
+ finish. When checking for transactions that could still use the original
+ index, concurrent index creation advances through potentially interfering
+ older transactions one at a time, obtaining shared locks on their virtual
+ transaction identifiers to wait for them to complete.
+ </para>
+
+ <para>
If a problem arises while scanning the table, such as a
uniqueness violation in a unique index, the <command>CREATE INDEX</>
command will fail but leave behind an <quote>invalid</> index. This index