Re: [patch] Add schema total size to psql \dn+

From: Gilles Darold <gilles(dot)darold(at)dalibo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [patch] Add schema total size to psql \dn+
Date: 2019-02-25 08:51:22
Message-ID: f9553632-820e-2002-9968-69fd64fc1619@dalibo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Le 22/02/2019 à 19:21, Tom Lane a écrit :
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Wed, Feb 20, 2019 at 5:26 PM Gilles Darold <gilles(dot)darold(at)dalibo(dot)com> wrote:
>>> The attached simple patch adds this feature. Is there any cons adding
>>> this information?
>> Well, it'll take time to compute, maybe a lot of time if the database
>> is big and the server is busy. Not sure how serious that problem can
>> get.
> 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.

That's right, I've removed the patch. My first idea was to add a server
side function pg_schema_size() but I was thinking that a psql
implementation was enough but obviously that was not my best idea ever.
Let me know if there is any interest in having this pg_schema_size()
server side function that could take care of user permissions or be used
by a super user only.

Best regards,

--
Gilles Darold
Consultant PostgreSQL
http://dalibo.com - http://dalibo.org

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gilles Darold 2019-02-25 08:56:53 Re: [patch] Add schema total size to psql \dn+
Previous Message Tsunakawa, Takayuki 2019-02-25 08:49:51 RE: Protect syscache from bloating with negative cache entries