From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Ian Lawrence Barwick <barwick@gmail.com>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: [PATCH] psql: \dn+ to show size of each schema..
Date: Wed, 14 Jul 2021 07:42:33 +0200
Message-ID: <2c5c19ffe1a812223b2d60b1248ef31e8b51caaa.camel@cybertec.at> (raw)
In-Reply-To: <CAB8KJ=gmykiuQKgWpPVQJO69jsSnEKx=1L_+TefEjNWQOL-Oow@mail.gmail.com>
References: <20210714030725.GG9600@telsasoft.com>
<CAB8KJ=gmykiuQKgWpPVQJO69jsSnEKx=1L_+TefEjNWQOL-Oow@mail.gmail.com>
On Wed, 2021-07-14 at 14:05 +0900, Ian Lawrence Barwick wrote:
> 2021年7月14日(水) 12:07 Justin Pryzby <pryzby@telsasoft.com>:
> > \db+ and \l+ show sizes of tablespaces and databases, so I was surprised in the
> > past that \dn+ didn't show sizes of schemas. I would find that somewhat
> > convenient, and I assume other people would use it even more useful.
>
> It's something which would be useful to have. But see this previous proposal:
>
> https://www.postgresql.org/message-id/flat/2d6d2ebf-4dbc-4f74-17d8-05461f4782e2%40dalibo.com
Right, I would not like to cause a lot of I/O activity just to look at the
permissions on a schema...
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.
What about inventing a function pg_schema_size(regnamespace)?
Yours,
Laurenz Albe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: laurenz.albe@cybertec.at, barwick@gmail.com, pryzby@telsasoft.com
Subject: Re: [PATCH] psql: \dn+ to show size of each schema..
In-Reply-To: <2c5c19ffe1a812223b2d60b1248ef31e8b51caaa.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox