Re: CREATE INDEX CONCURRENTLY?

From: Greg Stark <stark(at)mit(dot)edu>
To: Mark Woodward <mark(dot)woodward(at)actifio(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: CREATE INDEX CONCURRENTLY?
Date: 2014-10-31 14:43:22
Message-ID: CAM-w4HOpoXYHnYOh27j87W9UT_4y0M0S-n_fWghRpFmZ-uLqjg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Oct 31, 2014 at 2:28 PM, Mark Woodward
<mark(dot)woodward(at)actifio(dot)com> wrote:
> I have not kept up with PostgreSQL changes and have just been using it. A
> co-worker recently told me that you need to word "CONCURRENTLY" in "CREATE
> INDEX" to avoid table locking. I called BS on this because to my knowledge
> PostgreSQL does not lock tables. I referenced this page in the
> documentation:

You can read from tables while a normal index build is in progress but
you can't insert, update, or delete from them. CREATE INDEX
CONCURRENTLY allows you to insert, update, and delete data while the
index build is running at the expense of having the index build take
longer.

--
greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2014-10-31 14:44:58 Re: Reducing Catalog Locking
Previous Message Andrew Dunstan 2014-10-31 14:40:19 Re: CREATE INDEX CONCURRENTLY?