From: Shivakumar Ramannavar <shivasr@gmail.com>
To: pgsql-admin@postgresql.org
Subject: my table is empty, pg_relation_size(name) return 38 MB
Date: Thu, 4 Aug 2011 16:54:53 +0530
Message-ID: <CACdOLXY7C19fcD+ULSjXe6b_VFiGh7+MvFnninGfPA9o7kRdTQ@mail.gmail.com> (raw)
In-Reply-To: <CACdOLXZjY-UekAepXP98NLrxABo-nV+7ND_vQPvCbfUO9sgfvA@mail.gmail.com>
References: <CACdOLXZjY-UekAepXP98NLrxABo-nV+7ND_vQPvCbfUO9sgfvA@mail.gmail.com>
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
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-admin@postgresql.org
Cc: shivasr@gmail.com
Subject: Re: my table is empty, pg_relation_size(name) return 38 MB
In-Reply-To: <CACdOLXY7C19fcD+ULSjXe6b_VFiGh7+MvFnninGfPA9o7kRdTQ@mail.gmail.com>
* 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