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/commands/analyze.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/backend/commands/analyze.c') diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c index 09269d9187c..0c713b3ca67 100644 --- a/src/backend/commands/analyze.c +++ b/src/backend/commands/analyze.c @@ -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); -- cgit v1.2.3