Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group