From: Ireneusz Pluta/wp.pl <ipluta@wp.pl>
To: luis.roberto@siscobra.com.br, pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: Table sizes
Date: Wed, 30 Sep 2020 15:41:38 +0200
Message-ID: <ac5663d1-933d-c453-6c8e-1e92185d7fdc@wp.pl> (raw)
In-Reply-To: <78366091.53791693.1601467902283.JavaMail.zimbra@siscobra.com.br>
References: <78366091.53791693.1601467902283.JavaMail.zimbra@siscobra.com.br>
W dniu 2020-09-30 o 14:11, luis.roberto@siscobra.com.br pisze:
> Hi!
>
> I'm trying to use this query to get table sizes, however I'm getting a strange error:
>
> select tablename,pg_relation_size(tablename::text)
> from pg_tables;
>
> In PG 13:
>
> SQL Error [42P01]: ERROR: relation "sql_implementation_info" does not exist
>
> In PG 12:
>
> SQL Error [42P01]: ERROR: relation "sql_parts" does not exist
>
You need to use full tablenames, using schemaname of pg_tables too.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: ipluta@wp.pl
Subject: Re: Table sizes
In-Reply-To: <ac5663d1-933d-c453-6c8e-1e92185d7fdc@wp.pl>
References: <78366091.53791693.1601467902283.JavaMail.zimbra@siscobra.com.br> <ac5663d1-933d-c453-6c8e-1e92185d7fdc@wp.pl>
* 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