Re: Deadlock between concurrent index builds on different tables - Mailing list pgsql-general

From Martin Marques
Subject Re: Deadlock between concurrent index builds on different tables
Date
Msg-id 1df2ab90-664f-1d91-8c58-a465a971d32e@2ndquadrant.com
Whole thread Raw
In response to Re: Deadlock between concurrent index builds on different tables  (Alban Hertroys <haramrae@gmail.com>)
List pgsql-general
El 23/12/17 a las 08:08, Alban Hertroys escribió:
> 
>> On 22 Dec 2017, at 22:53, Jeremy Finzel <finzelj@gmail.com> wrote:
>>
>> 2017-12-22 15:48:07.669 CST,"CREATE INDEX",2017-12-22 15:48:02 CST,8/32,0,ERROR,40P01,"deadlock detected","Process
4470waits for ShareLock on virtual transaction 4/262; blocked by process 4466.
 
>> Process 4466 waits for ShareLock on virtual transaction 8/32; blocked by process 4470.
>> Process 4470: CREATE INDEX CONCURRENTLY index_foo_on_created_at ON foo USING btree (created_at);
>> Process 4466: CREATE INDEX CONCURRENTLY index_bar_on_id ON bar USING btree (id);","See server log for query
details.",,,,"CREATEINDEX CONCURRENTLY index_foo_on_created_at ON foo USING btree (created_at);",,,""
 
> 
> If I read these logs correctly, you are creating the exact same index on foo (created_at) in both processes, which is
justwhat you were trying to prevent doing.
 

They are two distinct indexes. One on foo(create_at) and the other on
bar(id)


-- 
Martín Marqués                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


pgsql-general by date:

Previous
From: Alban Hertroys
Date:
Subject: Re: Deadlock between concurrent index builds on different tables
Next
From: Martin Marques
Date:
Subject: Re: Deadlock between concurrent index builds on different tables