Re: storage calculations - Mailing list pgsql-admin

From Peter Eisentraut
Subject Re: storage calculations
Date
Msg-id Pine.LNX.4.56.0307301424060.1171@krusty.credativ.de
Whole thread Raw
In response to Re: storage calculations  (pgboy@guthrie.charm.net)
List pgsql-admin
pgboy@guthrie.charm.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@gmx.net


pgsql-admin by date:

Previous
From: "John P. Looney"
Date:
Subject: Re: Postgres db corrupted ?
Next
From: Robert Treat
Date:
Subject: Re: 7.3.4 RPM ready for RH 7.1 and RH 7.2