diff options
Diffstat (limited to 'src/backend/access/nbtree/nbtree.c')
-rw-r--r-- | src/backend/access/nbtree/nbtree.c | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/src/backend/access/nbtree/nbtree.c b/src/backend/access/nbtree/nbtree.c index fa77318ea3f..79a69a7043f 100644 --- a/src/backend/access/nbtree/nbtree.c +++ b/src/backend/access/nbtree/nbtree.c @@ -12,7 +12,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/nbtree/nbtree.c,v 1.112 2004/02/10 01:55:24 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/access/nbtree/nbtree.c,v 1.113 2004/02/10 03:42:43 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -22,6 +22,7 @@ #include "access/heapam.h" #include "access/nbtree.h" #include "catalog/index.h" +#include "commands/vacuum.h" #include "miscadmin.h" #include "storage/freespace.h" #include "storage/smgr.h" @@ -584,27 +585,7 @@ btbulkdelete(PG_FUNCTION_ARGS) maxoff; BlockNumber nextpage; - CHECK_FOR_INTERRUPTS(); - - /* - * If we're called by a cost based vacuum, do the - * napping in case the balance exceeded the limit. - */ - if (VacuumCostActive && !InterruptPending && - VacuumCostBalance >= VacuumCostLimit) - { - int msec; - - msec = VacuumCostNaptime * VacuumCostBalance / VacuumCostLimit; - if (msec < VacuumCostNaptime * 4) - PG_MSLEEP(msec); - else - PG_MSLEEP(VacuumCostNaptime * 4); - - VacuumCostBalance = 0; - - CHECK_FOR_INTERRUPTS(); - } + vacuum_delay_point(); ndeletable = 0; page = BufferGetPage(buf); |