From 79d1289d4cca25939d8887a133063b94dbc521fa Mon Sep 17 00:00:00 2001 From: James Coleman Date: Fri, 31 Jul 2020 12:28:54 -0400 Subject: [PATCH v2 1/2] 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. --- doc/src/sgml/ref/create_index.sgml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml index 33aa64e81d..a37342ee77 100644 --- a/doc/src/sgml/ref/create_index.sgml +++ b/doc/src/sgml/ref/create_index.sgml @@ -600,7 +600,8 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] ) predating the second - scan to terminate. Then finally the index can be marked ready for use, + 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 CREATE INDEX 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 -- 2.20.1 (Apple Git-117)