From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Josh Berkus <josh(at)agliodbs(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_restore dependencies |
Date: | 2009-04-10 23:26:53 |
Message-ID: | 49DFD5BD.1010208@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)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.
>
>
>
Well, what I have in mind is a bit bigger, but not large. See attached
patch.
cheers
andrew
Attachment | Content-Type | Size |
---|---|---|
depfix.patch | text/x-patch | 1.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2009-04-10 23:34:00 | Re: pg_restore dependencies |
Previous Message | Tom Lane | 2009-04-10 22:57:16 | Re: pg_restore dependencies |