Re: ALTER TABLE SET STATISTICS requires AccessExclusiveLock

Simon Riggs <simon@2ndquadrant.com>

From: Simon Riggs <simon@2ndQuadrant.com>
To: pgsql-hackers@postgresql.org
Date: 2010-07-15T09:24:27Z
Lists: pgsql-hackers

Attachments

On Thu, 2010-07-08 at 07:16 +0100, Simon Riggs wrote:

> I'll take my previous patch through to completion now

Patch to reduce lock levels for 
 ALTER TABLE
 CREATE TRIGGER
 CREATE RULE

I've completely re-analyzed the required lock levels for sub-commands,
so lock levels can now also be these, if appropriate.
 ShareUpdateExclusiveLock - allows db reads and writes
 ShareRowExclusiveLock - allows db reads only

When ALTER TABLE is specified with multiple subcommands the highest lock
level required by any subcommand is applied to the whole combined
command.

The lock levels are in many ways different from both my own earlier
patch and much of the discussion on this thread, which I have taken to
be general comments rather than considered thought.

Nothing much speculative here, so will commit in a few days barring
objections.

-- 
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Development, 24x7 Support, Training and Services