Index table locking

From: Mark Woodward <mark(dot)woodward(at)actifio(dot)com>
To: pgadmin-hackers(at)postgresql(dot)org
Subject: Index table locking
Date: 2014-10-31 14:14:12
Message-ID: CAO4kwD=2_iBMv3ca1ydTNHxe=UX8ipT8Z9t+Rph-sYsg6QYK6w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-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 sentece 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?

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2014-10-31 14:21:48 Re: Index table locking
Previous Message Марк Коренберг 2014-10-30 20:35:35 index only scans are not shown graphically