Search Postgresql Archives

Re: Suggest note in index documentation about long running transactions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris Travers <chris.travers@xxxxxxxxx> writes:
> Unless there is a sense that this is a bad idea I will submit a doc patch.

I was already working on it ... I think what we want is something along
this line in the "Building Indexes Concurrently" section of the CREATE
INDEX ref page:

*** create_index.sgml.orig     Tue Feb  2 10:56:09 2016
--- create_index.sgml       Tue Feb 16 10:48:38 2016
*************** CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ]
*** 443,448 ****
--- 443,452 ----
      scan starts.   Concurrent index creation serially waits for each old
      transaction to complete using the method outlined in section <xref
      linkend="view-pg-locks">.
+     In addition, once the <command>CREATE INDEX CONCURRENTLY</> command does
+     complete, the index is still not immediately ready for use: it cannot
+     be used until all transactions that were active when index creation
+     started are gone.
     </para>
  
     <para>

However, now that I look at it, the existing text in this para is kind of
a mess too.  That cross-reference to pg_locks, for example, seems
gratuitous and confusing (because what it's pointing you at is a single
sentence deeply buried in a rather long page).  It's also not very clear
what is meant by "Any transaction active when the second table scan starts
can block concurrent index creation until it completes"; I think we need
to be a little clearer about when that happens or doesn't happen.

			regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux