Re: Suggest note in index documentation about long running transactions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Suggest note in index documentation about long running transactions
Дата
Msg-id 23839.1455638084@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Suggest note in index documentation about long running transactions  (Chris Travers <chris.travers@gmail.com>)
Ответы Re: Suggest note in index documentation about long running transactions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Chris Travers <chris.travers@gmail.com> 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


В списке pgsql-general по дате отправления:

Предыдущее
От: Suresh Raja
Дата:
Сообщение: refer function name by a variable in the function body
Следующее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: [SQL] refer function name by a variable in the function body