Re: Call closed: Almost happy ending (from "Data files became huge with no apparent reason" thread)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Dario Fumagalli <dfumagalli(at)tin(dot)it>, pgsql-general(at)postgresql(dot)org
Subject: Re: Call closed: Almost happy ending (from "Data files became huge with no apparent reason" thread)
Date: 2002-09-04 04:05:10
Message-ID: 24338.1031112310@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
> I actually had a thought last night. REINDEX recreates the index, probably
> with *all* rows in the table, whether or not they are still active. Thus, to
> get maximum effect from REINDEX, you need to VACUUM first.

No. REINDEX boils down to IndexBuildHeapScan(), which uses
HeapTupleSatisfiesVacuum() to decide which tuples are worth indexing;
the tuples that get indexed are *exactly* the same ones that would
survive VACUUM.

In recent releases, anyway; before 7.2 things might have been flakier.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2002-09-04 06:15:38 Re: referential integrity with inheritance
Previous Message Curt Sampson 2002-09-04 04:03:54 A Testimonial