Thread: Checking my HD space (noarchive)

Checking my HD space (noarchive)

From
"Ries van Twisk"
Date:
Hi All,

My bare text table is in size around 6Mb while the footprint of my database
on HD (using du) is around 24Mb (after a vacuum -f)
I have normalized the tables on places where I could do it.
For your reference it's a squid2.2 access.log textfile.
How can I check witch tables/indexes takes up so much space?

And I did understand that postgresql can compress text but it seems that
this is not the default case.
can anybody tell me somthing about it and/or point my to a url??

Ries



Re: Checking my HD space (noarchive)

From
Richard Huxton
Date:
On Monday 03 Mar 2003 4:36 pm, Ries van Twisk wrote:
> Hi All,
>
> My bare text table is in size around 6Mb while the footprint of my database
> on HD (using du) is around 24Mb (after a vacuum -f)
> I have normalized the tables on places where I could do it.
> For your reference it's a squid2.2 access.log textfile.
> How can I check witch tables/indexes takes up so much space?

Your database files have a name equal to the object's oid. So if you have a
table with oid=1234 look for a file named "1234". You can figure out oids
manually, but there's a tool "oid2name" in the contrib folder of the source
distribution which can help you.

A 3x increase over a raw text file isn't unexpected once you allow for
structure overheads, indexes etc.

> And I did understand that postgresql can compress text but it seems that
> this is not the default case.
> can anybody tell me somthing about it and/or point my to a url??

I think you're talking about TOAST - check the manuals and techdocs, there's a
section about it somewhere. It's automatic for large textfields, and was
originally developed to work around PG's old 8k rowsize limit.

HTH

--  Richard Huxton