Re: Why this lock? - Mailing list pgsql-general

From Tom Lane
Subject Re: Why this lock?
Date
Msg-id 20024.1440511742@sss.pgh.pa.us
Whole thread Raw
In response to Re: Why this lock?  (Johann Spies <johann.spies@gmail.com>)
List pgsql-general
Johann Spies <johann.spies@gmail.com> writes:
> On 25 August 2015 at 15:52, Merlin Moncure <mmoncure@gmail.com> wrote:
>> creating and index requires exclusive access.  did you try the
>> concurrent variant?

> Yes. The one which I stopped after 5 days, was running concurrently.  There
> was a similar lock involved.

That lock type is used by CREATE INDEX CONCURRENTLY when it has to wait
out another transaction.  There is no way around this, it's an inherent
part of that algorithm.

http://www.postgresql.org/docs/9.4/static/sql-createindex.html#SQL-CREATEINDEX-CONCURRENTLY

            regards, tom lane


pgsql-general by date:

Previous
From: Johann Spies
Date:
Subject: Re: Why this lock?
Next
From: Adrian Klaver
Date:
Subject: Re: PostgreSQL Developer Best Practices