diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-01-06 00:37:44 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-01-06 00:37:44 +0000 |
commit | 3b6cbce458d80176250af38b225541f53d5cad8e (patch) | |
tree | 816c11ac05da6b84cd2ab7ed3fc47b428c2e50f6 /src/backend/commands/analyze.c | |
parent | 734e4212784d7baa3dc809e25f9cb6de8329211f (diff) | |
download | postgresql-3b6cbce458d80176250af38b225541f53d5cad8e.tar.gz postgresql-3b6cbce458d80176250af38b225541f53d5cad8e.zip |
Add CHECK_FOR_INTERRUPTS() in various strategic spots, per comments
from Hiroshi.
Diffstat (limited to 'src/backend/commands/analyze.c')
-rw-r--r-- | src/backend/commands/analyze.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c index 085032cd7ac..e6d9a574e2b 100644 --- a/src/backend/commands/analyze.c +++ b/src/backend/commands/analyze.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.24 2001/10/25 20:37:30 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.25 2002/01/06 00:37:44 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -516,6 +516,7 @@ acquire_sample_rows(Relation onerel, HeapTuple *rows, int targrows, rows[numrows++] = heap_copytuple(tuple); if (numrows >= targrows) break; + CHECK_FOR_INTERRUPTS(); } heap_endscan(scan); @@ -584,6 +585,8 @@ acquire_sample_rows(Relation onerel, HeapTuple *rows, int targrows, OffsetNumber targoffset, maxoffset; + CHECK_FOR_INTERRUPTS(); + t = select_next_random_record(t, targrows, &rstate); /* Try to read the t'th record in the table */ targpos = t / tuplesperpage; @@ -881,6 +884,8 @@ compute_minimal_stats(VacAttrStats *stats, int firstcount1, j; + CHECK_FOR_INTERRUPTS(); + value = heap_getattr(tuple, stats->attnum, tupDesc, &isnull); /* Check for null/nonnull */ @@ -1158,6 +1163,8 @@ compute_scalar_stats(VacAttrStats *stats, Datum value; bool isnull; + CHECK_FOR_INTERRUPTS(); + value = heap_getattr(tuple, stats->attnum, tupDesc, &isnull); /* Check for null/nonnull */ |