Re: [DOCS] postgres index rebuild - Mailing list pgsql-docs

From Michael Paquier
Subject Re: [DOCS] postgres index rebuild
Date
Msg-id CAB7nPqTD9brONbiOrHG9hdpm3H3ey0RJqFUN=Bfa7tWT_n7uFQ@mail.gmail.com
Whole thread Raw
In response to Re: [DOCS] postgres index rebuild  (Euler Taveira <euler@timbira.com.br>)
Responses Re: [DOCS] postgres index rebuild
List pgsql-docs
On Fri, May 26, 2017 at 3:24 PM, Euler Taveira <euler@timbira.com.br> wrote:
> CIC can't be executed inside a transaction block or a user-defined function
> because it involves some phases that are not easily rollback-able. Instead
> create a small script with those commands.

If you are interested in the reasons why multiple transactions are
needed, just go through DefineIndex() in indexcmds.c, particularly the
comments. It explains all the phases that are happening for a
concurrent index build, what are the validation phases, what are the
wait phases, etc. The same applies for DROP INDEX with index_drop() in
index.c.
--
Michael


pgsql-docs by date:

Previous
From: Euler Taveira
Date:
Subject: Re: [DOCS] postgres index rebuild
Next
From: Peter Eisentraut
Date:
Subject: [DOCS] SCRAM RFC