Re: Estimating Database Disk Space

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: ralough(at)iee(dot)org
Cc: PostgreSQL Novice ML <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Estimating Database Disk Space
Date: 2002-03-18 15:43:19
Message-ID: 28815.1016466199@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Richard A Lough <ralough(dot)ced(at)dnet(dot)co(dot)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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Richard A Lough 2002-03-18 18:51:32 Re: Estimating Database Disk Space
Previous Message Richard A Lough 2002-03-18 14:02:22 Estimating Database Disk Space