Skip to content

Commit f8fe328

Browse files
committed
Some small editorialization on the description of CREATE INDEX
CONCURRENTLY. Greg Stark, some further tweaks by me.
1 parent 0b4bf85 commit f8fe328

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

doc/src/sgml/indices.sgml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/indices.sgml,v 1.60 2006/09/10 00:29:34 tgl Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/indices.sgml,v 1.61 2006/09/13 23:42:26 tgl Exp $ -->
22

33
<chapter id="indexes">
44
<title id="indexes-title">Indexes</title>
@@ -93,8 +93,9 @@ CREATE INDEX test1_id_index ON test1 (id);
9393
<para>
9494
Creating an index on a large table can take a long time. By default,
9595
<productname>PostgreSQL</productname> allows reads (selects) to occur
96-
on the table in parallel with index creation, but writes (inserts,
96+
on the table in parallel with creation of an index, but writes (inserts,
9797
updates, deletes) are blocked until the index build is finished.
98+
In production environments this is often unacceptable.
9899
It is possible to allow writes to occur in parallel with index
99100
creation, but there are several caveats to be aware of &mdash;
100101
for more information see <xref linkend="SQL-CREATEINDEX-CONCURRENTLY"

doc/src/sgml/ref/create_index.sgml

+7-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/create_index.sgml,v 1.56 2006/08/25 04:06:45 tgl Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/create_index.sgml,v 1.57 2006/09/13 23:42:26 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -264,22 +264,19 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] <replaceable class="parameter">name</re
264264
</indexterm>
265265

266266
<para>
267-
Creating an index for a large table can be a long operation. In large data
268-
warehousing applications it can easily take hours or even days to build
269-
indexes. It's important to understand the impact creating indexes has on a
270-
system.
271-
</para>
272-
273-
<para>
267+
Creating an index can interfere with regular operation of a database.
274268
Normally <productname>PostgreSQL</> locks the table to be indexed against
275269
writes and performs the entire index build with a single scan of the
276270
table. Other transactions can still read the table, but if they try to
277271
insert, update, or delete rows in the table they will block until the
278-
index build is finished.
272+
index build is finished. This could have a severe effect if the system is
273+
a live production database. Large tables can take many hours to be
274+
indexed, and even for smaller tables, an index build can lock out writers
275+
for periods that are unacceptably long for a production system.
279276
</para>
280277

281278
<para>
282-
<productname>PostgreSQL</> also supports building indexes without locking
279+
<productname>PostgreSQL</> supports building indexes without locking
283280
out writes. This method is invoked by specifying the
284281
<literal>CONCURRENTLY</> option of <command>CREATE INDEX</>.
285282
When this option is used,

0 commit comments

Comments
 (0)