Re: [patch] Add schema total size to psql \dn+ - Mailing list pgsql-hackers

From Julien Rouhaud
Subject Re: [patch] Add schema total size to psql \dn+
Date
Msg-id CAOBaU_Zb0n1NfK7xPeJ=RGvtziVNBMvqZMxXOKsRCoWSr5wkyg@mail.gmail.com
Whole thread Raw
In response to Re: [patch] Add schema total size to psql \dn+  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Feb 22, 2019 at 7:22 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Is there any permissions issue involved here?  I'd be a bit worried
> about whether \dn+ could fail, or deliver misleading answers, when
> run by a user without permissions on (some) tables.  Also, even if
> we allow people to get size info on tables they can't read today,
> having this feature would be a roadblock to tightening that in
> the future.

Gilles' patch is using pg_total_relation_size(), so there's no
permission check at all.  Also AFAICS this function even allows any
user to get the size of any other user backend's temporary table.


pgsql-hackers by date:

Previous
From: Chapman Flack
Date:
Subject: Re: proposal: variadic argument support for least, greatest function
Next
From: Tomas Vondra
Date:
Subject: Re: FETCH FIRST clause PERCENT option