Re: [PATCHES] 300 seconds in less than 1 second with pg_autovacuum

"Dave Page" <[email protected]>
Newsgroups gmane.comp.db.postgresql.devel.win32,gmane.comp.db.postgresql.devel.patches
Message-ID <E7F85A1B5FF8D44C8A1AF6885BC9A0E45285AD@ratbert.vale-housing.co.uk>
 

> -----Original Message-----
> From: Andrew Dunstan [mailto:[email protected]] 
> Sent: 21 January 2005 14:01
> To: Dave Page
> Cc: [email protected]; [email protected]; 
> [email protected]
> Subject: Re: [PATCHES] [pgsql-hackers-win32] 300 seconds in 
> less than 1 second with pg_autovacuum
> 
>
> 
> We should not be using either of these, should we? 
> pg_usleep() is platform
> independent.

True. Attached.

Regards, Dave.


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [email protected])
pg_autovacuum.c.diff (application/octet-stream, 697 B)
cvs diff -u pg_autovacuum.c (in directory C:\Documents and Settings\dpage\My Documents\CVS\pgsql\contrib\pg_autovacuum)
Index: pg_autovacuum.c
===================================================================
RCS file: /projects/cvsroot/pgsql/contrib/pg_autovacuum/pg_autovacuum.c,v
retrieving revision 1.27
diff -u -r1.27 pg_autovacuum.c
--- pg_autovacuum.c	2 Dec 2004 22:48:10 -0000	1.27
+++ pg_autovacuum.c	21 Jan 2005 13:22:46 -0000
@@ -1699,7 +1703,7 @@
 			fflush(LOGOUTPUT);
 		}
 
-		sleep(sleep_secs);		/* Larger Pause between outer loops */
+		pg_usleep(sleep_secs * 1000);	/* Larger Pause between outer loops */
 
 		gettimeofday(&then, 0); /* Reset time counter */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.