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