1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +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/commands/analyze.c,v 1.66 2004/01/06 18:07:31 neilc Exp $
* $PostgreSQL: pgsql/src/backend/commands/analyze.c,v 1.67 2004/02/10 03:42:43 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -529,7 +529,7 @@ acquire_sample_rows(Relation onerel, HeapTuple *rows, int targrows,
rows[numrows++] = heap_copytuple(tuple);
if (numrows >= targrows)
break;
CHECK_FOR_INTERRUPTS();
vacuum_delay_point();
}
heap_endscan(scan);
@ -604,7 +604,7 @@ acquire_sample_rows(Relation onerel, HeapTuple *rows, int targrows,
OffsetNumber targoffset,
maxoffset;
CHECK_FOR_INTERRUPTS();
vacuum_delay_point();
t = select_next_random_record(t, targrows, &rstate);
/* Try to read the t'th record in the table */
@ -912,7 +912,7 @@ compute_minimal_stats(VacAttrStats *stats,
int firstcount1,
j;
CHECK_FOR_INTERRUPTS();
vacuum_delay_point();
value = heap_getattr(tuple, stats->attnum, tupDesc, &isnull);
@ -1214,7 +1214,7 @@ compute_scalar_stats(VacAttrStats *stats,
Datum value;
bool isnull;
CHECK_FOR_INTERRUPTS();
vacuum_delay_point();
value = heap_getattr(tuple, stats->attnum, tupDesc, &isnull);