Re: Estimating Database Disk Space - Mailing list pgsql-novice

From Tom Lane
Subject Re: Estimating Database Disk Space
Date
Msg-id 28815.1016466199@sss.pgh.pa.us
Whole thread Raw
In response to Estimating Database Disk Space  (Richard A Lough <ralough.ced@dnet.co.uk>)
List pgsql-novice
Richard A Lough <ralough.ced@dnet.co.uk> writes:
> I have three databases, each of which take up about 2+ MB when dumped.
> I have tried deleting one database and re-installing. This suggests that
> about 38Mb of disk space is taken up by each database. I suspect that if
> postgres were deleted entirely, about 250 MB would be freed.

A "du" on your $PGDATA directory would give you some facts instead of
guesses.

FWIW, the per-database overhead is a couple of megabytes in my
experience (basically the size of another set of system catalogs).

pg_xlog will occupy some small multiple of 16MB depending on your
WAL configuration settings.  This is independent of how many databases
you have in the installation --- but it is affected by your transaction
rate.

If your installation has been around for awhile then you might be
noticing growth of pg_log --- it grows at a steady rate of 2 bits per
transaction.  In 7.2 and later there are provisions to recycle that
space, but not in 7.1.

Or you might be seeing problems with index bloat.  Hard to tell with
no breakdown of the space usage to go on.

            regards, tom lane

pgsql-novice by date:

Previous
From: Richard A Lough
Date:
Subject: Estimating Database Disk Space
Next
From: Richard A Lough
Date:
Subject: Re: Estimating Database Disk Space