Re: postgres index rebuild

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Euler Taveira <euler(at)timbira(dot)com(dot)br>
Cc: jashobanta(dot)mahapatra(at)mahindracomviva(dot)com, pgsql-docs(at)postgresql(dot)org
Subject: Re: postgres index rebuild
Date: 2017-05-26 20:14:11
Message-ID: CAB7nPqTD9brONbiOrHG9hdpm3H3ey0RJqFUN=Bfa7tWT_n7uFQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Fri, May 26, 2017 at 3:24 PM, Euler Taveira <euler(at)timbira(dot)com(dot)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

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Peter Eisentraut 2017-05-28 02:33:03 SCRAM RFC
Previous Message Euler Taveira 2017-05-26 19:24:33 Re: postgres index rebuild