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/commands/analyze.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/commands/analyze.c')
-rw-r--r-- | src/backend/commands/analyze.c | 10 |
1 files changed, 5 insertions, 5 deletions
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); |