Re: Create Index Locking Question - Mailing list pgsql-admin

From Tom Lane
Subject Re: Create Index Locking Question
Date
Msg-id 1571.1135293698@sss.pgh.pa.us
Whole thread Raw
In response to Create Index Locking Question  (Mike C <smith.not.western@gmail.com>)
List pgsql-admin
Mike C <smith.not.western@gmail.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

pgsql-admin by date:

Previous
From: Simon Riggs
Date:
Subject: Re: WAL and pg_dump
Next
From: Tom Lane
Date:
Subject: Re: WAL and pg_dump