Re: pg_tablespace_size() - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: pg_tablespace_size()
Date
Msg-id 20071012144039.GG6334@svr2.hagander.net
Whole thread Raw
In response to pg_tablespace_size()  (Dave Page <dpage@postgresql.org>)
Responses Re: pg_tablespace_size()
List pgsql-hackers
On Fri, Oct 12, 2007 at 12:20:08PM +0100, Dave Page wrote:
> Following on from Hiroshi's earlier post:
> http://archives.postgresql.org/pgsql-hackers/2007-10/msg00324.php
>
> Per http://archives.postgresql.org/pgsql-hackers/2007-08/msg01018.php,
> superusers should be able to use pg_tablespace_size() on any tablespace,
> however when logged in as postgres on a beta1 server, I get:
>
> -- Executing query:
> select pg_tablespace_size('pg_global');
>
> ERROR:  permission denied for tablespace pg_global
>
> Can this be fixed please?

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.

I think the correct behaviour is that superusers should be able to do it,
and that's in the thread that Dave referred to. But since Tom said it's "by
design" in the message above, I'd like confirmation that this is ok.

Since I think that allowing superusers to do it is the only sensible thing,
I will apply this patch unless someone objects :-)

//Magnus

Attachment

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Locales and Encodings
Next
From: Magnus Hagander
Date:
Subject: Re: Locale + encoding combinations