*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/vacuumlazy.c,v 1.112 2008/12/03 13:05:22 heikki Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/vacuumlazy.c,v 1.113 2008/12/04 11:42:23 heikki Exp $
*
*-------------------------------------------------------------------------
*/
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);
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.413 2008/11/24 08:46:03 petere Exp $
+ * $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.414 2008/12/04 11:42:23 heikki Exp $
*
*-------------------------------------------------------------------------
*/
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);
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.338 2008/11/24 08:46:03 petere Exp $
+ * $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.339 2008/12/04 11:42:24 heikki Exp $
*
*-------------------------------------------------------------------------
*/
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);
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.641 2008/11/26 08:45:11 petere Exp $
+ * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.642 2008/12/04 11:42:24 heikki Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
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;
}
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.87 2008/11/12 10:10:32 heikki Exp $
+ * $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.88 2008/12/04 11:42:24 heikki Exp $
*
*-------------------------------------------------------------------------
*/
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;
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.379 2008/11/24 08:46:04 petere Exp $
+ * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.380 2008/12/04 11:42:24 heikki Exp $
*
*-------------------------------------------------------------------------
*/
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 */