BlockNumber possibly_freeable;
PGRUsage ru0;
TimestampTz starttime = 0;
- bool scan_all;
pg_rusage_init(&ru0);
/* Open all indexes of the relation */
vac_open_indexes(onerel, RowExclusiveLock, &nindexes, &Irel);
vacrelstats->hasindex = (nindexes > 0);
-
- /* Should we use the visibility map or scan all pages? */
- if (vacstmt->freeze_min_age != -1)
- scan_all = true;
- else
- scan_all = false;
/* Do the vacuuming */
- lazy_scan_heap(onerel, vacrelstats, Irel, nindexes, scan_all);
+ lazy_scan_heap(onerel, vacrelstats, Irel, nindexes, vacstmt->scan_all);
/* Done with indexes */
vac_close_indexes(nindexes, Irel, NoLock);
COPY_SCALAR_FIELD(analyze);
COPY_SCALAR_FIELD(verbose);
COPY_SCALAR_FIELD(freeze_min_age);
+ COPY_SCALAR_FIELD(scan_all);
COPY_NODE_FIELD(relation);
COPY_NODE_FIELD(va_cols);
COMPARE_SCALAR_FIELD(analyze);
COMPARE_SCALAR_FIELD(verbose);
COMPARE_SCALAR_FIELD(freeze_min_age);
+ COMPARE_SCALAR_FIELD(scan_all);
COMPARE_NODE_FIELD(relation);
COMPARE_NODE_FIELD(va_cols);
n->analyze = false;
n->full = $2;
n->freeze_min_age = $3 ? 0 : -1;
+ n->scan_all = $3;
n->verbose = $4;
n->relation = NULL;
n->va_cols = NIL;
n->analyze = false;
n->full = $2;
n->freeze_min_age = $3 ? 0 : -1;
+ n->scan_all = $3;
n->verbose = $4;
n->relation = $5;
n->va_cols = NIL;
n->vacuum = true;
n->full = $2;
n->freeze_min_age = $3 ? 0 : -1;
+ n->scan_all = $3;
n->verbose |= $4;
$$ = (Node *)n;
}
vacstmt.full = false;
vacstmt.analyze = tab->at_doanalyze;
vacstmt.freeze_min_age = tab->at_freeze_min_age;
+ vacstmt.scan_all = tab->at_wraparound;
vacstmt.verbose = false;
vacstmt.relation = NULL; /* not used since we pass a relid */
vacstmt.va_cols = NIL;
bool full; /* do FULL (non-concurrent) vacuum */
bool analyze; /* do ANALYZE step */
bool verbose; /* print progress info */
+ bool scan_all; /* force scan of all pages */
int freeze_min_age; /* min freeze age, or -1 to use default */
RangeVar *relation; /* single table to process, or NULL */
List *va_cols; /* list of column names, or NIL for all */