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

Re: Create Index Locking Question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mike C <smith(dot)not(dot)western(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Create Index Locking Question
Date: 2005-12-22 23:21:38
Message-ID: 1571.1135293698@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-admin
Mike C <smith(dot)not(dot)western(at)gmail(dot)com> writes:
> 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?

The inserting transactions are blocked until the CREATE INDEX is done.

			regards, tom lane

In response to

pgsql-admin by date

Next:From: Tom LaneDate: 2005-12-22 23:32:41
Subject: Re: WAL and pg_dump
Previous:From: Simon RiggsDate: 2005-12-22 22:17:32
Subject: Re: WAL and pg_dump

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