From b9f3a929ee6b0309c50d837f464da7440303d2ef Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 12 Jul 2001 04:11:13 +0000 Subject: Create a new HeapTupleSatisfiesVacuum() routine in tqual.c that embodies the validity checking rules for VACUUM. Make some other rearrangements of the VACUUM code to allow more code to be shared between full and lazy VACUUM. Minor code cleanups and added comments for TransactionId manipulations. --- src/include/commands/vacuum.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'src/include/commands') diff --git a/src/include/commands/vacuum.h b/src/include/commands/vacuum.h index 0d9f66d04b3..ff02055052e 100644 --- a/src/include/commands/vacuum.h +++ b/src/include/commands/vacuum.h @@ -7,23 +7,43 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: vacuum.h,v 1.36 2001/06/27 23:31:39 tgl Exp $ + * $Id: vacuum.h,v 1.37 2001/07/12 04:11:13 tgl Exp $ * *------------------------------------------------------------------------- */ #ifndef VACUUM_H #define VACUUM_H +#include +#include + +#ifdef HAVE_GETRUSAGE +#include +#else +#include "rusagestub.h" +#endif + #include "nodes/parsenodes.h" #include "storage/block.h" +/* State structure for vac_init_rusage/vac_show_rusage */ +typedef struct VacRUsage +{ + struct timeval tv; + struct rusage ru; +} VacRUsage; + + /* in commands/vacuum.c */ extern void vacuum(VacuumStmt *vacstmt); extern void vac_update_relstats(Oid relid, BlockNumber num_pages, double num_tuples, bool hasindex); +extern void vac_init_rusage(VacRUsage *ru0); +extern const char *vac_show_rusage(VacRUsage *ru0); + /* in commands/analyze.c */ extern void analyze_rel(Oid relid, VacuumStmt *vacstmt); -- cgit v1.2.3