Re: pg_tablespace_size() - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: pg_tablespace_size()
Date
Msg-id 470F9F3A.4020207@hagander.net
Whole thread Raw
In response to Re: pg_tablespace_size()  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Magnus Hagander <magnus@hagander.net> writes:
>> Attached is a patch I want to apply for this. Toms message at
>> http://archives.postgresql.org/pgsql-hackers/2007-10/msg00448.php makes me
>> bring it up here before I apply it.
> 
> [ squint... ]  There is something wrong here, because a superuser should
> certainly pass the aclcheck test.  I don't know where the bug is but
> this is not the correct fix.

Are you sure? pg_tablespace_aclmask() has:   /*    * Only shared relations can be stored in global space; don't let
even   * superusers override this    */   if (spc_oid == GLOBALTABLESPACE_OID && !IsBootstrapProcessingMode())
return0;
 


And this is what causes the failure. I certainly didn't want to take out
that check, so short-circuiting it in the way I did seemed right..

//Magnus



pgsql-hackers by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Locales and Encodings
Next
From: Tom Lane
Date:
Subject: Re: pg_tablespace_size()