Skip site navigation (1) Skip section navigation (2)

Create Index Locking Question

From: Mike C <smith(dot)not(dot)western(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Create Index Locking Question
Date: 2005-12-22 20:58:20
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
I need to create a new index on an existing table. The table is constantly
inserted into every second. Does CREATE INDEX require an exclusive write
lock on the table? If it does have a write lock what happens to the insert
statements at the time, are they simply played later or do they fail?

From I see
CREATE INDEX apparently requires a write lock, but I'm not 100% certain
because the CREATE INDEX was used to describe part of the REINDEX command.

The CREATE INDEX page makes no mention of locking issues:

Could someone please clarify for me: Will I lose the INSERT statements
performed while a CREATE INDEX is running?


Mike C.


pgsql-admin by date

Next:From: Mike CDate: 2005-12-22 21:09:28
Subject: Re: WAL and pg_dump
Previous:From: Alain Rodriguez AriasDate: 2005-12-22 18:35:43
Subject: lo_ functions

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group