DB files, sizes and cleanup

From: "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: DB files, sizes and cleanup
Date: 2010-12-17 16:09:29
Message-ID: 482E80323A35A54498B8B70FF2B87980047E266891@azsmsx504.amr.corp.intel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi:

I'm trying to justify disk space for a new linux server they're going to give me for my Postgres instance. When I do a "du" of the place I installed the older instance on the system that is to be replaced, I see that the vast, vast majorityof the space goes to the contents of the "base" dir. In there are a bunch of files with integers for names (iod's ?). And some of those have millions of files inside.

Is this normal? Should there be millions of files in some of these "base" directories?
Is this indicative of some sort of problem or lack of cleanup that I should have been doing?

The "du" shows that I'm using 196G (again, mostly in "base") but pg_database_size shows something like 1/4 that amount, around 50G. I'd like to know if there's something I'm supposed to be doing to cleanup old (possibly deleted) data.

Also, I was running pg_size_pretty(pg_database_size('mydb')) on all the dbs. It runs very fast for most, but just hangs for two of the databases. Is this indicative of some sort of problem? (BTW, the 2 it hangs on are very much like others that it doesn't hang on, so I used those numbers to estimate the 50G)

Thanks in Advance.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Melvin Davidson 2010-12-17 16:16:52 Re: Table both does not and does exist! wth?
Previous Message Adrian Klaver 2010-12-17 16:05:21 Re: Table both does not and does exist! wth?