pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Simon Riggs <simon@2ndQuadrant.com>
To: Tom Lane <tgl@postgresql.org>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Fix LOCK TABLE to eliminate the race condition that could make it
Date: Tue, 12 May 2009 21:50:38 +0100
Message-ID: <1242161438.3843.334.camel@ebony.2ndQuadrant> (raw)
In-Reply-To: <20090512164332.BFC1575407D@cvs.postgresql.org>
References: <20090512164332.BFC1575407D@cvs.postgresql.org>


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.com
 PostgreSQL Training, Services and Support




view thread (7+ messages)  latest in thread

Message-ID: <1242161438.3843.334.camel@ebony.2ndQuadrant>
Permalink:  ../1242161438.3843.334.camel@ebony.2ndQuadrant/
Also on:    postgresql.org/message-id/1242161438.3843.334.camel@ebony.2ndQuadrant

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: simon@2ndQuadrant.com, tgl@postgresql.org, pgsql-hackers@postgresql.org
  Subject: Re: [COMMITTERS] pgsql: Fix LOCK TABLE to eliminate the race condition that could make it
  In-Reply-To: <1242161438.3843.334.camel@ebony.2ndQuadrant>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox