Search Postgresql Archives

Re: Database size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux