summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlvaro Herrera2022-05-20 08:05:31 +0000
committerAlvaro Herrera2022-05-20 08:05:31 +0000
commita5084a10fe60412036899a79b3aee76ba31a3579 (patch)
tree39fdf4f9a10777f6454ecb8f81f56a7870e5b517
parent25f915b31e41e5c86e1905d199c7d41cc66161ed (diff)
doc: Explain 'invalid' index state for CREATE INDEX CONCURRENTLY
It wasn't previously mentioned that the index is created as invalid, which is confusing to new users. Backpatch to 14 (only because of a conflict in 13). Author: Laurenz Albe <[email protected]> Reported-by: Lauren Fliksteen <[email protected]> Reviewed-by: Rajakavitha Kodhandapani <[email protected]> Discussion: https://postgr.es/m/[email protected]
-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 d3102a87d9..907324b93e 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -622,7 +622,8 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] <replaceable class=
</para>
<para>
- In a concurrent index build, the index is actually entered into
+ In a concurrent index build, the index is actually entered as an
+ <quote>invalid</quote> index into
the system catalogs in one transaction, then two table scans occur in
two more transactions. Before each table scan, the index build must
wait for existing transactions that have modified the table to terminate.
@@ -631,7 +632,7 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] <replaceable class=
scan to terminate, including transactions used by any phase of concurrent
index builds on other tables, if the indexes involved are partial or have
columns that are not simple column references.
- Then finally the index can be marked ready for use,
+ Then finally the index can be marked <quote>valid</quote> and 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