Re: Reducing some DDL Locks to ShareLock

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Reducing some DDL Locks to ShareLock
Date: 2008-10-08 12:20:14
Message-ID: 27231.1223468414@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Simon Riggs <simon(at)2ndQuadrant(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2008-10-08 12:24:20 Re: [PATCHES] Infrastructure changes for recovery (v8)
Previous Message Heikki Linnakangas 2008-10-08 11:43:01 Re: [PATCHES] Infrastructure changes for recovery (v8)