|
4 | 4 | * Revisions by Christopher B. Browne, Liberty RMS
|
5 | 5 | * Win32 Service code added by Dave Page
|
6 | 6 | *
|
7 |
| - * $PostgreSQL: pgsql/contrib/pg_autovacuum/pg_autovacuum.c,v 1.32 2005/05/1114:53:43 momjian Exp $ |
| 7 | + * $PostgreSQL: pgsql/contrib/pg_autovacuum/pg_autovacuum.c,v 1.33 2005/05/1117:57:56 momjian Exp $ |
8 | 8 | */
|
9 | 9 |
|
10 | 10 | #include"postgres_fe.h"
|
@@ -1749,7 +1749,16 @@ VacuumLoop(int argc, char **argv)
|
1749 | 1749 | fflush(LOGOUTPUT);
|
1750 | 1750 | }
|
1751 | 1751 |
|
1752 |
| -pg_usleep(sleep_secs*1000000L);/* Larger Pause between outer loops */ |
| 1752 | +/* Larger Pause between outer loops */ |
| 1753 | +/* |
| 1754 | + *pg_usleep() is wrong here because its maximum is ~2000 seconds, |
| 1755 | + *and we don't need signal interruptability on Win32 here. |
| 1756 | + */ |
| 1757 | +#ifndefWIN32 |
| 1758 | +sleep(sleep_secs);/* Unix sleep is seconds */ |
| 1759 | +#else |
| 1760 | +sleep(sleep_secs*1000);/* Win32 sleep() is milliseconds */ |
| 1761 | +#endif |
1753 | 1762 |
|
1754 | 1763 | gettimeofday(&then,0);/* Reset time counter */
|
1755 | 1764 |
|
|