Re: CREATE INDEX CONCURRENTLY? - Mailing list pgsql-hackers

From Greg Stark
Subject Re: CREATE INDEX CONCURRENTLY?
Date
Msg-id CAM-w4HOpoXYHnYOh27j87W9UT_4y0M0S-n_fWghRpFmZ-uLqjg@mail.gmail.com
Whole thread Raw
In response to CREATE INDEX CONCURRENTLY?  (Mark Woodward <mark.woodward@actifio.com>)
Responses Re: CREATE INDEX CONCURRENTLY?
List pgsql-hackers
On Fri, Oct 31, 2014 at 2:28 PM, Mark Woodward
<mark.woodward@actifio.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



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: CREATE INDEX CONCURRENTLY?
Next
From: Simon Riggs
Date:
Subject: Re: Reducing Catalog Locking