my table is empty, pg_relation_size(name) return 38 MB - Mailing list pgsql-admin

From Shivakumar Ramannavar
Subject my table is empty, pg_relation_size(name) return 38 MB
Date
Msg-id CACdOLXZjY-UekAepXP98NLrxABo-nV+7ND_vQPvCbfUO9sgfvA@mail.gmail.com
Whole thread Raw
List pgsql-admin

Hi Team,

Though my table is empty, pg_relation_size(name) return 38 MB. I use below query to determine tables disk usages.

SELECT nspname || '.' || relname AS "Table",
    pg_total_relation_size(C.oid) "Size",
    pg_size_pretty(pg_total_relation_size(C.oid)) AS "Total size"
  FROM pg_class C
  LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
  WHERE nspname NOT IN ('pg_catalog', 'information_schema')
    AND C.relkind <> 'i'
    AND nspname !~ '^pg_toast'

Please help,
Thanks!
Shiva
--
Shivakumar Ramannavar

pgsql-admin by date:

Previous
From: "Bradley Holbrook, Servillian Technology"
Date:
Subject: Dump SQL DDL of all functions in DB
Next
From: Sumeet Jauhar
Date:
Subject: Fwd: Suspected Postgres Datacorruption