Re: Reducing some DDL Locks to ShareLock - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Reducing some DDL Locks to ShareLock
Date
Msg-id 27231.1223468414@sss.pgh.pa.us
Whole thread Raw
In response to Re: Reducing some DDL Locks to ShareLock  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
Simon Riggs <simon@2ndQuadrant.com> writes:
> On Wed, 2008-10-08 at 11:24 +0300, Heikki Linnakangas wrote:
>> Simon Riggs wrote:
>>> (That in itself is painful, surely DDL should fail if
>>> it sees another DDL statement in progress trying to do same thing).
>> 
>> Surely not. The other transaction doing the DDL might roll back.

> Maybe so, but trying to create a duplicate object in the first place is
> also fairly questionable.

Indeed, which is why I wonder why you are concerning yourself with this
case at all.  I certainly don't think that it needs to drive the design.

In the case of a parallel restore, the restore script is going to be
specifying constraint names to match the old database; so the
name-selection code won't even be executed, and collisions aren't going
to happen.

I'd be happier with switching to the two-catalog design since it would
at least make one of the uniqueness conditions bulletproof; but that's
a cleanup issue that does not seem very relevant to parallel restore
performance issues.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: [PATCHES] Infrastructure changes for recovery (v8)
Next
From: Simon Riggs
Date:
Subject: Re: [PATCHES] Infrastructure changes for recovery (v8)