1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Add CHECK_FOR_INTERRUPTS() in various strategic spots, per comments

from Hiroshi.
This commit is contained in:
Tom Lane
2002-01-06 00:37:44 +00:00
parent 734e421278
commit 3b6cbce458
8 changed files with 39 additions and 10 deletions

View File

@ -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 */