Some small editorialization on the description of CREATE INDEX
authorTom Lane
Wed, 13 Sep 2006 23:42:26 +0000 (23:42 +0000)
committerTom Lane
Wed, 13 Sep 2006 23:42:26 +0000 (23:42 +0000)
CONCURRENTLY.  Greg Stark, some further tweaks by me.

doc/src/sgml/indices.sgml
doc/src/sgml/ref/create_index.sgml

index 17630c586d61cb0e39d252d1dc43cc313cf7c40e..d060d044de08c40b04048c88488b1e7d0d9fcd59 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
 
  Indexes
@@ -93,8 +93,9 @@ CREATE INDEX test1_id_index ON test1 (id);
   
    Creating an index on a large table can take a long time.  By default,
    PostgreSQL allows reads (selects) to occur
-   on the table in parallel with index creation, but writes (inserts,
+   on the table in parallel with creation of an index, but writes (inserts,
    updates, deletes) are blocked until the index build is finished.
+   In production environments this is often unacceptable.
    It is possible to allow writes to occur in parallel with index
    creation, but there are several caveats to be aware of —
    for more information see 
index be0ca63f2c591038676a4da6c30666a313461957..d89a553a86f47b28c7b1c0e91f5e9d81498e89b6 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -264,22 +264,19 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] name
    
 
    
-    Creating an index for a large table can be a long operation. In large data
-    warehousing applications it can easily take hours or even days to build
-    indexes. It's important to understand the impact creating indexes has on a
-    system.
-   
-
-   
+    Creating an index can interfere with regular operation of a database.
     Normally PostgreSQL locks the table to be indexed against
     writes and performs the entire index build with a single scan of the
     table. Other transactions can still read the table, but if they try to
     insert, update, or delete rows in the table they will block until the
-    index build is finished.
+    index build is finished. This could have a severe effect if the system is
+    a live production database. Large tables can take many hours to be
+    indexed, and even for smaller tables, an index build can lock out writers
+    for periods that are unacceptably long for a production system.
    
 
    
-    PostgreSQL also supports building indexes without locking
+    PostgreSQL supports building indexes without locking
     out writes.  This method is invoked by specifying the
     CONCURRENTLY option of CREATE INDEX.
     When this option is used,