Centralize implementation of delay code by creating a pg_usleep()
Tom Lane <tgl@sss.pgh.pa.us>
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?
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/gist/gist.c | modified | +4 −1 |
| src/backend/access/hash/hash.c | modified | +4 −1 |
| src/backend/access/nbtree/nbtree.c | modified | +3 −22 |
| src/backend/access/rtree/rtree.c | modified | +4 −1 |
| src/backend/access/transam/xact.c | modified | +2 −3 |
| src/backend/commands/analyze.c | modified | +5 −5 |
| src/backend/commands/vacuum.c | modified | +47 −6 |
| src/backend/commands/vacuumlazy.c | modified | +4 −68 |
| src/backend/storage/buffer/bufmgr.c | modified | +2 −3 |
| src/backend/storage/lmgr/s_lock.c | modified | +2 −3 |
| src/backend/utils/init/globals.c | modified | +4 −3 |
| src/include/commands/vacuum.h | modified | +2 −1 |
| src/include/miscadmin.h | modified | +5 −34 |
| src/include/port.h | modified | +6 −1 |
| src/Makefile.global.in | modified | +2 −2 |
| src/port/pgsleep.c | added | +42 −0 |