Re: [GENERAL] Database takes up MUCH more disk space than it should

2012-01-22 Thread Dan Charrois
On 2012-Jan-21, at 6:39 PM, Scott Marlowe wrote: > On Sat, Jan 21, 2012 at 1:37 AM, Dan Charrois wrote: >> Hi everyone. I'm currently in the situation of administering a rather large >> PostgreSQL database which for some reason seems to be even much larger than >>

Re: [GENERAL] Database takes up MUCH more disk space than it should

2012-01-22 Thread Dan Charrois
>> >> SELECT relname, pg_size_pretty(relpages::bigint * 8 *1024) AS size, CASE >> WHEN relkind = 't' THEN (SELECT pgd.relname FROM pg_class pgd WHERE >> pgd.relfilenode::text = SUBSTRING(pg.relname FROM 10)) ELSE (SELECT >> pgc.relname FROM pg_class pgc WHERE pg.reltoastrelid = pgc.relfilenode) >>

[GENERAL] Database takes up MUCH more disk space than it should

2012-01-21 Thread Dan Charrois
Hi everyone. I'm currently in the situation of administering a rather large PostgreSQL database which for some reason seems to be even much larger than it should be. I'm currently running version 8.4.5 - not the latest and greatest, I know - but this is a live database that would problematic t