From: | Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Determining size of a database before dumping |
Date: | 2006-10-02 22:52:31 |
Message-ID: | 4521982F.6000304@cox.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 10/02/06 16:19, Tom Lane wrote:
> Alexander Staubo <alex(at)purefiction(dot)net> writes:
>> You could count the disk space usage of the actual stored tuples,
>> though this will necessarily be inexact:
>> http://www.postgresql.org/docs/8.1/static/diskusage.html
>> Or you could count the size of the physical database files (/var/lib/
>> postgresql or wherever). While these would be estimates, you could at
>> least guarantee that the dump would not *exceed* the esimtate.
>
> You could guarantee no such thing; consider compression of TOAST values.
> Even for uncompressed data, datatypes such as int and float can easily
> print as more bytes than they occupy on-disk.
>
> Given all the non-data overhead involved (eg for indexes), it's probably
> unlikely that a text dump would exceed the "du" size of the database,
> but it's far from "guaranteed".
It's my experience that when there are lots of numeric fields,
fixed-width text records are approx 2.5x larger than the original
binary records.
- --
Ron Johnson, Jr.
Jefferson LA USA
Is "common sense" really valid?
For example, it is "common sense" to white-power racists that
whites are superior to blacks, and that those with brown skins
are mud people.
However, that "common sense" is obviously wrong.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
iD8DBQFFIZgvS9HxQb37XmcRAp6xAKC74LV+2wR6Ao5Oq56RInkkDP8PZgCglKEv
z0fvjrXTloWJJ7qdhfOpIoI=
=jICB
-----END PGP SIGNATURE-----
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2006-10-02 23:12:29 | Re: Determining size of a database before dumping |
Previous Message | Alexander Staubo | 2006-10-02 22:42:31 | Re: Determining size of a database before dumping |