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

From Simon Riggs
Subject Re: Reducing some DDL Locks to ShareLock
Date
Msg-id 1223384183.4747.160.camel@ebony.2ndQuadrant
Whole thread Raw
In response to Re: Reducing some DDL Locks to ShareLock  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On Tue, 2008-10-07 at 08:30 -0400, Andrew Dunstan wrote:

> Simon Riggs wrote:
> >
> > My main focus is on these commands
> > * CREATE TRIGGER
> > * ALTER TABLE ..  ADD PRIMARY KEY
> > * ALTER TABLE ..  ADD FOREIGN KEY
> >
> > because those are the most painful ones. We could make it work against
> > more, but we'd need to rewrite lots and lots of catalog update code.

> Anything that scans the table is a prime candidate. In particular, for 
> parallel pg_dump, ALTER TABLE ... ADD UNIQUE is important, as well as 
> possibly other table constraints.

Yes, I should have mentioned: today's patch (v5) does ADD UNIQUE also.

I tested a concurrent mix of ALTER PK, FK and CREATE INDEX, all fine.

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Subtransaction commits and Hot Standby
Next
From: "Robert Haas"
Date:
Subject: Re: Reducing some DDL Locks to ShareLock