Re: [ADMIN] blocking issue when create index concurrently - Mailing list pgsql-admin

From Tom Lane
Subject Re: [ADMIN] blocking issue when create index concurrently
Date
Msg-id 1878.1481823217@sss.pgh.pa.us
Whole thread Raw
In response to [ADMIN] blocking issue when create index concurrently  (xu jian <jamesxu@outlook.com>)
Responses [ADMIN] 答复: [ADMIN] blocking issue when create index concurrently  (xu jian <jamesxu@outlook.com>)
List pgsql-admin
xu jian <jamesxu@outlook.com> writes:
>           I was trying to create 2 indexes concurrently(on different table) in same database. I didn't expect the
firstcreate index operation would block the other one since they were running on different table. 

> However, it is not true. I found one creating index command was blocking the other one.

There are (IIRC) two separate points in CREATE INDEX CONCURRENTLY where it
has to wait for all other transactions to exit.  That would include a
transaction running another CREATE INDEX (CONCURRENTLY), even if it's for
a different table.  I think running two at once would end in a deadlock
failure, since they would likely end up waiting for each other.

Usually, if you're using C.I.C., you're trying to minimize the impact
on the rest of the system, so running two at once seems a bit
counterproductive anyway.

            regards, tom lane


pgsql-admin by date:

Previous
From: Payal Singh
Date:
Subject: Re: [ADMIN] Database corrupted - PSQL 9.3 Ubuntu Server 14.04
Next
From: xu jian
Date:
Subject: [ADMIN] 答复: [ADMIN] blocking issue when create index concurrently