Re: Online index builds - Mailing list pgsql-general

From Tom Lane
Subject Re: Online index builds
Date
Msg-id 23215.1165538650@sss.pgh.pa.us
Whole thread Raw
In response to Re: Online index builds  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: Online index builds  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-general
Jeff Davis <pgsql@j-davis.com> writes:
> I don't understand. CREATE INDEX CONCURRENTLY can't be run in a
> transaction block anyway, so a REINDEX CONCURRENTLY wouldn't either. So
> how (or when) would you deadlock?

The problem is you need to upgrade from a nonexclusive table lock to an
exclusive one before you could drop the old index.  If someone else
is waiting to get a conflicting lock, boom ...

            regards, tom lane

pgsql-general by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Online index builds
Next
From: Jeff Davis
Date:
Subject: Re: Online index builds