Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNaxe-0006Sc-A1 for pgsql-general@arkaria.postgresql.org; Wed, 30 Sep 2020 12:11:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kNaxc-0005bY-N4 for pgsql-general@arkaria.postgresql.org; Wed, 30 Sep 2020 12:11:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNaxc-0005bR-F4 for pgsql-general@lists.postgresql.org; Wed, 30 Sep 2020 12:11:52 +0000 Received: from mxh01aws49.mxout.inova.com.br ([34.198.242.49] helo=mxhero01.a.inova.com.br) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNaxW-0005RS-GX for pgsql-general@lists.postgresql.org; Wed, 30 Sep 2020 12:11:52 +0000 Received: from ip-10-0-4-78.ec2.internal (localhost [127.0.0.1]) by mxhero01.a.inova.com.br (Postfix) with ESMTP id 63FAF1CA522 for ; Wed, 30 Sep 2020 12:11:43 +0000 (UTC) Received: from corpmoutpolicyd01.a.inova.com.br (puppetmaster.a.inova.com.br [10.0.1.88]) by mxhero01.a.inova.com.br (Postfix) with ESMTP for ; Wed, 30 Sep 2020 12:11:43 +0000 (UTC) Received: from corpmoutpolicyd01.a.inova.com.br (localhost [127.0.0.1]) by corpmoutpolicyd01.a.inova.com.br (Postfix) with ESMTP id 5B5DE2209D1 for ; Wed, 30 Sep 2020 09:11:42 -0300 (BRT) Received: from corpmout01.a.inova.com.br (ip-10-0-1-125.ec2.internal [10.0.1.125]) by corpmoutpolicyd01.a.inova.com.br (Postfix) with ESMTP id 55F8EBD2A1 for ; Wed, 30 Sep 2020 09:11:42 -0300 (BRT) Received: from corpmbox02.a.inova.com.br (ip-10-0-4-158.ec2.internal [10.0.4.158]) by corpmout01.a.inova.com.br (Postfix) with ESMTP for ; Wed, 30 Sep 2020 09:11:42 -0300 (-03) Date: Wed, 30 Sep 2020 09:11:42 -0300 (BRT) From: luis.roberto@siscobra.com.br To: pgsql-general Message-ID: <78366091.53791693.1601467902283.JavaMail.zimbra@siscobra.com.br> Subject: Table sizes MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_39f58a2e-70a2-455f-a9e8-9edcc03d0e2b" X-Originating-IP: [10.0.4.158] X-Mailer: Zimbra 8.8.15_GA_3955 (ZimbraWebClient - GC85 (Win)/8.8.15_GA_3953) Thread-Index: qxM2BntkSK3JgDtXE3HfOk98XY4JKw== Thread-Topic: Table sizes x-mxHero-Origin-Ip: /127.0.0.1:50628 X-mxHero-AttachmentBlock: rule=48;result=false List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --=_39f58a2e-70a2-455f-a9e8-9edcc03d0e2b Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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 --=_39f58a2e-70a2-455f-a9e8-9edcc03d0e2b Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
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_table= s;

In PG 13:<= br data-mce-bogus=3D"1">

SQL Error [42P0= 1]: ERROR: relation "sql_implementation_info" does not exist

= In PG 12:

SQL Error [42P01]: ERROR: relation "sql_parts" does not exist

--=_39f58a2e-70a2-455f-a9e8-9edcc03d0e2b--