From 58f337a3435cd6ac46dfca4ce1a44b837080745e Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 10 Feb 2004 03:42:45 +0000 Subject: Centralize implementation of delay code by creating a pg_usleep() subroutine in src/port/pgsleep.c. Remove platform dependencies from miscadmin.h and put them in port.h where they belong. Extend recent vacuum cost-based-delay patch to apply to VACUUM FULL, ANALYZE, and non-btree index vacuuming. By the way, where is the documentation for the cost-based-delay patch? --- src/backend/storage/buffer/bufmgr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/backend/storage/buffer/bufmgr.c') diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index 203e03ab059..0ad26ee4f0b 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.157 2004/02/10 01:55:25 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.158 2004/02/10 03:42:45 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -44,7 +44,6 @@ #include #include #include -#include #include #include "lib/stringinfo.h" @@ -972,7 +971,7 @@ BufferBackgroundWriter(void) * Nap for the configured time or sleep for 10 seconds if * there was nothing to do at all. */ - PG_USLEEP((n > 0) ? BgWriterDelay * 1000 : 10000000); + pg_usleep((n > 0) ? BgWriterDelay * 1000L : 10000000L); } } -- cgit v1.2.3