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