From: Shivakumar Ramannavar <shivasr@gmail.com>
To: pgsql-bugs@postgresql.org
Subject: BUG #6149: My table is empty but pg_relation_size(name) returns 39 MB
Date: Thu, 4 Aug 2011 11:16:04 GMT
Message-ID: <201108041116.p74BG4nR048658@wwwmaster.postgresql.org> (raw)
The following bug has been logged online:
Bug reference: 6149
Logged by: Shivakumar Ramannavar
Email address: shivasr@gmail.com
PostgreSQL version: 9.0.4
Operating system: open SUSE Linux
Description: My table is empty but pg_relation_size(name) returns 39
MB
Details:
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
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-bugs@postgresql.org
Cc: shivasr@gmail.com
Subject: Re: BUG #6149: My table is empty but pg_relation_size(name) returns 39 MB
In-Reply-To: <201108041116.p74BG4nR048658@wwwmaster.postgresql.org>
References: <201108041116.p74BG4nR048658@wwwmaster.postgresql.org>
* 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