Re: Doubt w.r.t vacuum

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
Cc: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, Shridhar Daithankar <shridhar_daithankar(at)persistent(dot)co(dot)in>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Doubt w.r.t vacuum
Date: 2003-07-28 19:38:10
Message-ID: 20735.1059421090@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Treat <xzilla(at)users(dot)sourceforge(dot)net> writes:
>> This is overoptimistic :-(. VACUUM FULL cannot necessarily compact the
>> table completely, and so it will record free space in FSM (if there is
>> any worth recording). An example situation is that page 1000 may
>> contain a very large tuple, which will not fit on any earlier page.

> Isn't it possible that the reshuffling of tuples before page 1000 could
> open up enough space to move the overly large tuple?

Not in the same vacuum pass. Reshuffling opens *zero* space until you
commit the shuffling transaction, because you can't destroy the old
copies until you commit the moved ones.

You could imagine making multiple passes, but at that point it's almost
certainly faster to forget the VACUUM FULL approach entirely, and do
something more like CLUSTER: copy all the live tuples into a new file.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-07-28 19:43:20 Re: Regression test failure date.
Previous Message Tom Lane 2003-07-28 19:32:56 Re: [HACKERS] allowed user/db variables