Re: Thoughts on maintaining 7.3 - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Thoughts on maintaining 7.3
Date
Msg-id 20031005031334.GB20484@dcc.uchile.cl
Whole thread Raw
In response to Re: Thoughts on maintaining 7.3  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Thoughts on maintaining 7.3  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sat, Oct 04, 2003 at 11:41:17AM -0400, Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Do we move empty index pages to the end before truncation during vacuum
> > full?
> 
> No.  You'd be better off using REINDEX for that, I think.  IIRC we have
> speculated about making VAC FULL fix the indexes via REINDEX rather than
> indexbulkdelete.

I can't agree with that idea.  Imagine having to VACUUM FULL a huge
table.  Not only it will take the lot required to do the VACUUM in the
heap itself, it will also have to rebuild all indexes from scratch.  I
think there are scenarios where the REINDEX will be much worse, say when
there are not too many deleted tuples (but in that case, why is the user
doing VACUUM FULL in the first place?).  Of course there are also
scenario where the opposite is true.

I wonder if VACUUM FULL could choose what method to use based on some
statistics.

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Vivir y dejar de vivir son soluciones imaginarias.
La existencia está en otra parte" (Andre Breton)


pgsql-hackers by date:

Previous
From: "Andrew Dunstan"
Date:
Subject: Re: [pgsql-hackers-win32] initdb
Next
From: Bruce Momjian
Date:
Subject: Re: Thoughts on maintaining 7.3