Re: storage calculations

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgboy(at)guthrie(dot)charm(dot)net
Cc: mendola(at)bigfoot(dot)com, pgsql-admin(at)postgresql(dot)org
Subject: Re: storage calculations
Date: 2003-07-31 09:01:24
Message-ID: Pine.LNX.4.56.0307301424060.1171@krusty.credativ.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

pgboy(at)guthrie(dot)charm(dot)net writes:

> sorry, when i referred to "disk space used" i meant the actual amount
> used by live rows. if i insert 1000 rows then delete 999 of them, the
> disk file will be the size of the 100 row container (make that 1000, not
> 100 - i cannot backspace here) until i do a "vacuum full" - which does a
> table lock, which is a bad thing.

The task that you originally described was that you want to monitor when
the disk is getting full. For that task, you need to take into account
the actual size of the data on disk, not the size after a "vacuum full"
which you say you do not want to execute. Basing a disk full monitor on
hypothetical sizes sounds pretty useless.

> given that, i'd like to try to be able to calculate the number of
> bytes a row uses given its schema. i've seen this kind of
> documentation for other dbs, i just cannot seem to find it
> in the postgresql docs.

There is some information about that in the FAQ, but keep in mind that
rows may be compressed or moved to secondary storage automatically.

--
Peter Eisentraut peter_e(at)gmx(dot)net

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message pgboy 2003-07-31 12:51:09 Re: storage calculations
Previous Message John P. Looney 2003-07-31 08:21:31 Re: Postgres db corrupted ?