Re: Reducing some DDL Locks to ShareLock
От | Tom Lane |
---|---|
Тема | Re: Reducing some DDL Locks to ShareLock |
Дата | |
Msg-id | 27231.1223468414@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Reducing some DDL Locks to ShareLock (Simon Riggs <simon@2ndQuadrant.com>) |
Список | 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 по дате отправления: