my table is empty, pg_relation_size(name) return 38 MB

From: Shivakumar Ramannavar <shivasr(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: my table is empty, pg_relation_size(name) return 38 MB
Date: 2011-08-04 11:24:53
Message-ID: CACdOLXY7C19fcD+ULSjXe6b_VFiGh7+MvFnninGfPA9o7kRdTQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

--
Shivakumar Ramannavar

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message pawcyk 2011-08-04 14:08:18 Streaming replication between x86 and x86_64 hosts
Previous Message Shivakumar Ramannavar 2011-08-04 11:22:36 my table is empty, pg_relation_size(name) return 38 MB