1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-11 10:01:57 +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

@ -31,7 +31,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/vacuumlazy.c,v 1.10 2001/10/28 06:25:43 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/vacuumlazy.c,v 1.11 2002/01/06 00:37:44 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -230,6 +230,8 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats,
hastup;
int prev_dead_count;
CHECK_FOR_INTERRUPTS();
/*
* If we are close to overrunning the available space for
* dead-tuple TIDs, pause and do a cycle of vacuuming before we
@ -464,6 +466,8 @@ lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
Buffer buf;
Page page;
CHECK_FOR_INTERRUPTS();
tblk = ItemPointerGetBlockNumber(&vacrelstats->dead_tuples[tupindex]);
buf = ReadBuffer(onerel, tblk);
LockBufferForCleanup(buf);
@ -770,6 +774,8 @@ count_nondeletable_pages(Relation onerel, LVRelStats *vacrelstats)
tupgone,
hastup;
CHECK_FOR_INTERRUPTS();
blkno--;
buf = ReadBuffer(onerel, blkno);