Re: ALTER TABLE SET STATISTICS requires AccessExclusiveLock - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: ALTER TABLE SET STATISTICS requires AccessExclusiveLock
Date
Msg-id 1278695881.29736.748.camel@ebony
Whole thread Raw
In response to Re: ALTER TABLE SET STATISTICS requires AccessExclusiveLock  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: ALTER TABLE SET STATISTICS requires AccessExclusiveLock
List pgsql-hackers
On Fri, 2010-07-09 at 13:04 -0400, Robert Haas wrote:

> Tom asked what happens when two transactions attempt to do concurrent
> actions on the same table.  Your response was that we should handle it
> like CREATE INDEX, and handle the update of the pg_class row
> non-transactionally.  But of course, if you use a self-conflicting
> lock at the relation level, then the relation locks conflict and you
> never have to worry about how to update the pg_class entry in the face
> of concurrent updates. 

>From memory, Tom was also worried about the prospect of people updating
pg_class directly using SQL. That seems a rare, yet valid concern.

I've already agreed with your point that we should use SHARE UPDATE
EXCLUSIVE.

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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Add a hook in ExecCheckRTPerms().
Next
From: Stephen Frost
Date:
Subject: Re: [COMMITTERS] pgsql: Add a hook in ExecCheckRTPerms().