From: | Mark Woodward <mark(dot)woodward(at)actifio(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | CREATE INDEX CONCURRENTLY? |
Date: | 2014-10-31 14:28:00 |
Message-ID: | CAO4kwDkwCtzMjnEbj8ttoovUi=KNJcYJHN5xkCK1dKJ3gmy9PA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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:
http://www.postgresql.org/docs/9.3/static/locking-indexes.html
However, I do see this sentence in the indexing page that was not in the
docs prior to 8.0:
"Creating an index can interfere with regular operation of a database.
Normally PostgreSQL locks the table to be indexed against writes and
performs the entire index build with a single scan of the table."
Is this true? When/why the change?
When we use "concurrently," it seems to hang. I am looking into it.
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2014-10-31 14:29:53 | Re: infinite loop in _bt_getstackbuf |
Previous Message | Robert Haas | 2014-10-31 14:08:59 | Re: group locking: incomplete patch, just for discussion |