Re: Reducing some DDL Locks to ShareLock

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Reducing some DDL Locks to ShareLock
Date: 2008-10-07 12:56:23
Message-ID: 1223384183.4747.160.camel@ebony.2ndQuadrant
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.com
PostgreSQL Training, Services and Support

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2008-10-07 14:05:11 Re: Reducing some DDL Locks to ShareLock
Previous Message Simon Riggs 2008-10-07 12:50:38 Re: Subtransaction commits and Hot Standby