Re: [PATCH] psql: \dn+ to show size of each schema (and \dA+ for AMs)

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: Ian Lawrence Barwick <barwick(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, gilles(at)darold(dot)net
Subject: Re: [PATCH] psql: \dn+ to show size of each schema (and \dA+ for AMs)
Date: 2021-07-16 09:10:33
Message-ID: 4adb425afa58e1a94e8674574351ff0fe1950bb1.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 2021-07-15 at 20:16 -0500, Justin Pryzby wrote:
> On Wed, Jul 14, 2021 at 07:42:33AM +0200, Laurenz Albe wrote:
> > Besides, schemas are not physical, but logical containers. So I see a point in
> > measuring the storage used in a certain tablespace, but not so much by all objects
> > in a certain schema. It might be useful for accounting purposes, though.
> >
> > But I don't expect it to be in frequent enough demand to add a psql command.
>
> But for "physical" storage it's also possible to get the size from the OS, much
> more efficiently, using /bin/df or zfs list (assuming nothing else is using
> those filesystems). The pg_*_size functions are inefficient, but psql \db+ and
> \l+ already call them anyway.

Hm, yes, the fact that \l+ does something similar detracts from my argument.
It seems somewhat inconsistent to have the size in \l+, but not in \dn+.

Still, there is a difference: I never need \l+, because \l already shows
the permissions on the database, but I often need \dn+ to see the permissions
on schemas. And I don't want to measure the size when I do that.

The problem is that our backslash commands are not totally consistent in
that respect, and we can hardly fix that.

Yours,
Laurenz Albe

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2021-07-16 09:26:43 Re: CREATE COLLATION - check for duplicate options and error out if found one
Previous Message Tomas Vondra 2021-07-16 08:45:59 Re: row filtering for logical replication