diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/commands/vacuum.h | 19 | ||||
| -rw-r--r-- | src/include/utils/pg_rusage.h | 37 |
2 files changed, 38 insertions, 18 deletions
diff --git a/src/include/commands/vacuum.h b/src/include/commands/vacuum.h index 71ec0580229..db954fff2d3 100644 --- a/src/include/commands/vacuum.h +++ b/src/include/commands/vacuum.h @@ -7,21 +7,13 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/commands/vacuum.h,v 1.60 2005/07/14 05:13:43 tgl Exp $ + * $PostgreSQL: pgsql/src/include/commands/vacuum.h,v 1.61 2005/10/03 22:52:24 tgl Exp $ * *------------------------------------------------------------------------- */ #ifndef VACUUM_H #define VACUUM_H -#include <sys/time.h> - -#ifdef HAVE_GETRUSAGE -#include <sys/resource.h> -#else -#include "rusagestub.h" -#endif - #include "access/htup.h" #include "catalog/pg_attribute.h" #include "catalog/pg_statistic.h" @@ -113,13 +105,6 @@ typedef struct VacAttrStats } VacAttrStats; -/* State structure for vac_init_rusage/vac_show_rusage */ -typedef struct VacRUsage -{ - struct timeval tv; - struct rusage ru; -} VacRUsage; - /* Default statistics target (GUC parameter) */ extern DLLIMPORT int default_statistics_target; /* DLLIMPORT for PostGIS */ @@ -137,8 +122,6 @@ extern void vacuum_set_xid_limits(VacuumStmt *vacstmt, bool sharedRel, TransactionId *oldestXmin, TransactionId *freezeLimit); extern bool vac_is_partial_index(Relation indrel); -extern void vac_init_rusage(VacRUsage *ru0); -extern const char *vac_show_rusage(VacRUsage *ru0); extern void vacuum_delay_point(void); /* in commands/vacuumlazy.c */ diff --git a/src/include/utils/pg_rusage.h b/src/include/utils/pg_rusage.h new file mode 100644 index 00000000000..2ee33f752c9 --- /dev/null +++ b/src/include/utils/pg_rusage.h @@ -0,0 +1,37 @@ +/*------------------------------------------------------------------------- + * + * pg_rusage.h + * header file for resource usage measurement support routines + * + * + * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California + * + * $PostgreSQL: pgsql/src/include/utils/pg_rusage.h,v 1.1 2005/10/03 22:52:26 tgl Exp $ + * + *------------------------------------------------------------------------- + */ +#ifndef PG_RUSAGE_H +#define PG_RUSAGE_H + +#include <sys/time.h> + +#ifdef HAVE_GETRUSAGE +#include <sys/resource.h> +#else +#include "rusagestub.h" +#endif + + +/* State structure for pg_rusage_init/pg_rusage_show */ +typedef struct PGRUsage +{ + struct timeval tv; + struct rusage ru; +} PGRUsage; + + +extern void pg_rusage_init(PGRUsage *ru0); +extern const char *pg_rusage_show(const PGRUsage *ru0); + +#endif /* PG_RUSAGE_H */ |
