from Hiroshi.
IndexTuple itup;
ItemPointer htup;
+ CHECK_FOR_INTERRUPTS();
+
/* current is the next index tuple */
blkno = ItemPointerGetBlockNumber(current);
offnum = ItemPointerGetOffsetNumber(current);
{
bool tupleIsAlive;
+ CHECK_FOR_INTERRUPTS();
+
if (snapshot == SnapshotAny)
{
/* do our own time qual check */
rows[numrows++] = heap_copytuple(tuple);
if (numrows >= targrows)
break;
+ CHECK_FOR_INTERRUPTS();
}
heap_endscan(scan);
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;
int firstcount1,
j;
+ CHECK_FOR_INTERRUPTS();
+
value = heap_getattr(tuple, stats->attnum, tupDesc, &isnull);
/* Check for null/nonnull */
Datum value;
bool isnull;
+ CHECK_FOR_INTERRUPTS();
+
value = heap_getattr(tuple, stats->attnum, tupDesc, &isnull);
/* Check for null/nonnull */
HeapTupleData LocalHeapTuple;
Buffer LocalBuffer;
+ CHECK_FOR_INTERRUPTS();
+
LocalHeapTuple.t_self = ScanResult->heap_iptr;
LocalHeapTuple.t_datamcxt = NULL;
LocalHeapTuple.t_data = NULL;
bool do_reap,
do_frag;
+ CHECK_FOR_INTERRUPTS();
+
buf = ReadBuffer(onerel, blkno);
page = BufferGetPage(buf);
blkno > last_move_dest_block;
blkno--)
{
+ CHECK_FOR_INTERRUPTS();
+
/*
* Forget fraged_pages pages at or after this one; they're no
* longer useful as move targets, since we only want to move down.
i < vacuumed_pages;
i++, curpage++)
{
+ CHECK_FOR_INTERRUPTS();
Assert((*curpage)->blkno < blkno);
if ((*curpage)->offsets_used == 0)
{
i < num_fraged_pages;
i++, curpage++)
{
+ CHECK_FOR_INTERRUPTS();
Assert((*curpage)->blkno < blkno);
if ((*curpage)->blkno > last_move_dest_block)
break; /* no need to scan any further */
for (i = 0, vacpage = vacuum_pages->pagedesc; i < nblocks; i++, vacpage++)
{
+ CHECK_FOR_INTERRUPTS();
if ((*vacpage)->offsets_free > 0)
{
buf = ReadBuffer(onerel, (*vacpage)->blkno);
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
Buffer buf;
Page page;
+ CHECK_FOR_INTERRUPTS();
+
tblk = ItemPointerGetBlockNumber(&vacrelstats->dead_tuples[tupindex]);
buf = ReadBuffer(onerel, tblk);
LockBufferForCleanup(buf);
tupgone,
hastup;
+ CHECK_FOR_INTERRUPTS();
+
blkno--;
buf = ReadBuffer(onerel, blkno);
*
*-------------------------------------------------------------------------
*/
+#include "postgres.h"
#include <sys/types.h>
#include <sys/file.h>
-#include "postgres.h"
-
#include "executor/executor.h"
+#include "miscadmin.h"
#include "utils/memutils.h"
{
TupleTableSlot *slot;
+ CHECK_FOR_INTERRUPTS();
+
slot = (*accessMtd) (node);
/*
*/
while (state->memtupcount > 0)
{
+ CHECK_FOR_INTERRUPTS();
/* write the tuple to destTape */
priorAvail = state->availMem;
srcTape = state->memtupindex[0];