Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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

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

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


pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group