diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-02-10 03:42:45 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-02-10 03:42:45 +0000 |
commit | 58f337a3435cd6ac46dfca4ce1a44b837080745e (patch) | |
tree | 03e4a309f7ada6914474c02fd9b53df7ab1da975 /src/backend/storage/lmgr/s_lock.c | |
parent | 87bd95638552b8fc1f5f787ce5b862bb6fc2eb80 (diff) | |
download | postgresql-58f337a3435cd6ac46dfca4ce1a44b837080745e.tar.gz postgresql-58f337a3435cd6ac46dfca4ce1a44b837080745e.zip |
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?
Diffstat (limited to 'src/backend/storage/lmgr/s_lock.c')
-rw-r--r-- | src/backend/storage/lmgr/s_lock.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/backend/storage/lmgr/s_lock.c b/src/backend/storage/lmgr/s_lock.c index 85d1a16516a..dcbf210519b 100644 --- a/src/backend/storage/lmgr/s_lock.c +++ b/src/backend/storage/lmgr/s_lock.c @@ -9,13 +9,12 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/storage/lmgr/s_lock.c,v 1.24 2004/01/09 21:08:49 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/storage/lmgr/s_lock.c,v 1.25 2004/02/10 03:42:45 tgl Exp $ * *------------------------------------------------------------------------- */ #include "postgres.h" -#include <sys/time.h> #include <unistd.h> #include "storage/s_lock.h" @@ -96,7 +95,7 @@ s_lock(volatile slock_t *lock, const char *file, int line) if (++delays > NUM_DELAYS) s_lock_stuck(lock, file, line); - PG_USLEEP(cur_delay * 10000); + pg_usleep(cur_delay * 10000L); #if defined(S_LOCK_TEST) fprintf(stdout, "*"); |