Re: How to optimize PostgreSQL database size

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jim Nasby <jnasby(at)pervasive(dot)com>
Cc: Qingqing Zhou <zhouqq(at)cs(dot)toronto(dot)edu>, pgsql-general(at)postgresql(dot)org
Subject: Re: How to optimize PostgreSQL database size
Date: 2006-06-22 21:15:51
Message-ID: 7111.1151010951@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jim Nasby <jnasby(at)pervasive(dot)com> writes:
> On Jun 18, 2006, at 10:47 PM, Qingqing Zhou wrote:
>> After dump/restore the database size is 1685 MB and after
>> vacuum-full/reindex is 1990 MB. Where we saved 305 MB?

> My guess would be due to toasted text columns...

No, it's probably got more to do with the fact that VACUUM FULL stops
trying to compact a table once it finds a row that it can't move down.
There can be quite a lot of empty space left in the table, if one of the
last rows is significantly wider than the average for the table.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-06-22 21:35:26 Re: autovacuum template0
Previous Message Relyea, Mike 2006-06-22 21:02:57 Re: Out of memory error in 8.1.0 Win32