Re: Database size - Mailing list pgsql-general

From Francisco Reyes
Subject Re: Database size
Date
Msg-id cone.1263235342.384926.30109.1000@shelca
Whole thread Raw
In response to Database size  ("Leonardo M." Ramé <l.rame@griensu.com>)
Responses Re: Database size
List pgsql-general
Leonardo M. Ramé writes:

> A customer of mine asked me to periodically delete old, unneeded records
> containing ByteA fields, because he think it will reduce the database
> size on disk. Is this true?.

No.

> For example, in Firebird, the database size
> is not reduced until you do a Backup-Restore of the database.

Not sure about ByteA, but in general... in potgres you need to do that or a
vacuum full.. or copy all the data of the table into a new table and rename.

Having said that.. if you delete old rows and do a vacuum and/or have
autovacuum enabled the  space of those old rows can be re-used, slowing down
the growth of the table. So yes, deleting old rows and doing a vacuum is a
good thing.. but no I don't believe it will reduce database size.

I say "don't believe" because I don't recall if byteA was stored in the
table itself or was stored outside using TOAST.. so I am not sure about
how/when space is released for it.

pgsql-general by date:

Previous
From: Sam Mason
Date:
Subject: Re: how much left for restore?
Next
From: Francisco Reyes
Date:
Subject: Re: how much left for restore?