summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2020-11-30 18:24:55 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2020-11-30 18:24:55 -0300
commitd3bd36a63d6995da2a25719372baca0275c86374 (patch)
treeaa67e83ef64aebba7a0fba44fecb51dccd5525b5
parent785f4462daaf6897ab3ac56b3170c2f988d0e93f (diff)
Document concurrent indexes waiting on each other
Because regular CREATE INDEX commands are independent, and there's no logical data dependency, it's not immediately obvious that transactions held by concurrent index builds on one table will block the second phase of concurrent index creation on an unrelated table, so document this caveat. Backpatch this all the way back. In branch master, mention that only some indexes are involved. Author: James Coleman <jtc331@gmail.com> Reviewed-by: David Johnston <david.g.johnston@gmail.com> Discussion: https://postgr.es/m/CAAaqYe994=PUrn8CJZ4UEo_S-FfRr_3ogERyhtdgHAb2WG_Ufg@mail.gmail.com
-rw-r--r--doc/src/sgml/ref/create_index.sgml5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index a43b76674e1..ea4b306450a 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -456,8 +456,9 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] <replaceable class=
wait for existing transactions that have modified the table to terminate.
After the second scan, the index build must wait for any transactions
that have a snapshot (see <xref linkend="mvcc">) predating the second
- scan to terminate. Then finally the index can be marked ready for use,
- and the <command>CREATE INDEX</> command terminates.
+ scan to terminate, including transactions used by any phase of concurrent
+ index builds on other tables. Then finally the index can be marked ready for use,
+ and the <command>CREATE INDEX</command> command terminates.
Even then, however, the index may not be immediately usable for queries:
in the worst case, it cannot be used as long as transactions exist that
predate the start of the index build.