Re: pg_restore dependencies - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_restore dependencies
Date
Msg-id 3003.1239404236@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_restore dependencies  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: pg_restore dependencies  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> What you're missing is that we need to compare the lockdeps of each item 
> (i.e. both the candidate item and the running item) with all the deps 
> (not just the lockdeps) of the other item. If neither item has any 
> lockdeps there will be no conflict. This will allow concurrent index 
> creation, since neither item will have any lockdeps. But it will prevent 
> us selecting a create index that conflicts with a running FK creation or 
> vice versa.

Oh, I see, you're using the deps as a proxy for the shared locks the
operation will acquire.  Yeah, that might work.  Seems like it's nearly
a one-liner fix, too.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: pg_restore dependencies
Next
From: Andrew Dunstan
Date:
Subject: Re: pg_restore dependencies