Re: pg_restore dependencies - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: pg_restore dependencies
Date
Msg-id 49DFBB3E.3040400@dunslane.net
Whole thread Raw
In response to Re: pg_restore dependencies  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pg_restore dependencies  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
>   
>> Yeah. I think the correct logic is roughly this: When considering if a 
>> candidate item has a locking conflict with a running item, then if 
>> *either* of them has a locking dependency that coincides with *any* 
>> dependency of the other item, then the candidate is rejected. The 
>> principle is that we don't give any item a chance to block on a lock.
>>     
>
> Doesn't that eliminate any chance of running two CREATE INDEXes
> concurrently on the same table?
>
>             
>   

No, since neither of them will have any locking dependencies, which are 
only for items that take an exclusive lock on the table(s), such as FK 
constraints.

cheers

andrew


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_restore dependencies
Next
From: Tom Lane
Date:
Subject: Re: A renewed plea for inclusion of zone.tab