1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-14 18:42:34 +03:00

Cost based vacuum delay feature.

Jan
This commit is contained in:
Jan Wieck
2004-02-06 19:36:18 +00:00
parent 687d7cf355
commit f425b605f4
9 changed files with 189 additions and 8 deletions

View File

@ -12,7 +12,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.150 2004/02/03 17:34:03 tgl Exp $
* $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.151 2004/02/06 19:36:18 wieck Exp $
*
* NOTES
* some of the information in this file should be moved to
@ -106,11 +106,19 @@ do { \
delay.tv_usec = ((_usec) % 1000000); \
(void) select(0, NULL, NULL, NULL, &delay); \
} while(0)
#define PG_MSLEEP(_msec) \
do { \
struct timeval _delay; \
_delay.tv_sec = (_msec) / 1000; \
_delay.tv_usec = ((_msec) % 1000) * 1000; \
(void) select (0, NULL, NULL, NULL, &_delay); \
} while(0)
#else
#define PG_USLEEP(_usec) \
do { \
SleepEx(((_usec) < 500 ? 1 : ((_usec) + 500) / 1000), TRUE); \
} while(0)
#define PG_MSLEEP(_msec) PG_USLEEP((_msec) * 1000)
#endif
#ifdef WIN32
@ -209,6 +217,15 @@ extern bool enableFsync;
extern bool allowSystemTableMods;
extern DLLIMPORT int work_mem;
extern DLLIMPORT int maintenance_work_mem;
extern int VacuumMem;
extern int VacuumCostPageHit;
extern int VacuumCostPageMiss;
extern int VacuumCostPageDirty;
extern int VacuumCostLimit;
extern int VacuumCostBalance;
extern int VacuumCostNaptime;
extern bool VacuumCostActive;
/*
* A few postmaster startup options are exported here so the