Re: [COMMITTERS] pgsql: Fix LOCK TABLE to eliminate the race condition that could make it - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: [COMMITTERS] pgsql: Fix LOCK TABLE to eliminate the race condition that could make it
Date
Msg-id 1242161438.3843.334.camel@ebony.2ndQuadrant
Whole thread Raw
Responses Re: [COMMITTERS] pgsql: Fix LOCK TABLE to eliminate the race condition that could make it
List pgsql-hackers
On Tue, 2009-05-12 at 16:43 +0000, Tom Lane wrote:

> Fix LOCK TABLE to eliminate the race condition that could make it give weird
> errors when tables are concurrently dropped.  To do this we must take lock
> on each relation before we check its privileges.  The old code was trying
> to do that the other way around, which is a bit pointless when there are lots
> of other commands that lock relations before checking privileges.  I did keep
> it checking each relation's privilege before locking the next relation, which
> is a detail that ALTER TABLE isn't too picky about.

If we're going to require cascaded permissions like this, would it make
sense to make GRANT cascade down the inheritance tree also? 

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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Show method of index
Next
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Fix LOCK TABLE to eliminate the race condition that could make it