On Tue, 2 May 2006, Tom Lane wrote:
> Also, as noted in other contexts, it'd be a good idea if vacuumcleanup
> was told the total number of heap tuples (GIN needs this), and both
> steps really ought to be able to find out if it's a full or lazy vacuum.
It's already in IndexVacuumCleanupInfo, isn't it?
/* Struct for additional arguments passed to vacuum-cleanup operation */
typedef struct IndexVacuumCleanupInfo
{
bool vacuum_full; /* VACUUM FULL (we have exclusive lock) */
int message_level; /* ereport level for progress messages */
--> double num_heap_tuples; /* tuples remaining in heap */
} IndexVacuumCleanupInfo;
gistvacuumcleanup uses num_heap_tuples to set num_index_tuples
when it doesn't need to scan the index otherwise.
BTW: Is it possible to have a partial gist index? If it is,
num_index_tuples = num_heap_tuples isn't right.
- Heikki