> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > The beauty of doing a temp index while keeping the old one is that you
> > can recover right away, and maybe allow the old index to be used while
> > you vacuum?
>
> Huh? You've got the whole table locked exclusively for the duration
> of the vacuum anyway.
>
> In fact, the instant that vacuum does its internal commit, the old index
> contents are actually *wrong*, and there is no possible value in keeping
> them after that. Might as well blow them away and recover the disk
> space for use in constructing the new indexes.
Oh, I thought the vacuum itself would use the index during processing.
>
> Also, I agree with Dmitry's concern about peak disk space usage. If
> we are rebuilding large btree indexes then we are going to see about a
> 2X-normal peak usage anyway, for the sort temp file and the new index.
> Making it 3X instead is just asking for trouble. Especially since,
> if you fail to rebuild the index, you are left with a corrupt index;
> it doesn't agree with the vacuumed table...
OK.
-- Bruce Momjian | http://www.op.net/~candle pgman@candle.pha.pa.us | (610)
853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill,
Pennsylvania19026