1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +03:00

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?
This commit is contained in:
Tom Lane
2004-02-10 03:42:45 +00:00
parent 87bd956385
commit 58f337a343
16 changed files with 138 additions and 154 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/access/hash/hash.c,v 1.70 2004/01/07 18:56:23 neilc Exp $
* $PostgreSQL: pgsql/src/backend/access/hash/hash.c,v 1.71 2004/02/10 03:42:43 tgl Exp $
*
* NOTES
* This file contains only the public interface routines.
@@ -23,6 +23,7 @@
#include "access/heapam.h"
#include "access/xlogutils.h"
#include "catalog/index.h"
#include "commands/vacuum.h"
#include "executor/executor.h"
#include "miscadmin.h"
@@ -514,6 +515,8 @@ loop_top:
OffsetNumber maxoffno;
bool page_dirty = false;
vacuum_delay_point();
buf = _hash_getbuf(rel, blkno, HASH_WRITE);
page = BufferGetPage(buf);
_hash_checkpage(rel, page, LH_BUCKET_PAGE | LH_OVERFLOW_PAGE);