diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-02-14 16:39:32 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-02-14 16:39:32 +0000 |
commit | 49758f47032acd18dac564771f850052b524dab8 (patch) | |
tree | ced62e915a7dd65f3e4286a7aa46b2639a766d2c /src/backend/access/gist/gistvacuum.c | |
parent | 006320e1d4c618e2fe7ed10668958281e6413303 (diff) | |
download | postgresql-49758f47032acd18dac564771f850052b524dab8.tar.gz postgresql-49758f47032acd18dac564771f850052b524dab8.zip |
Add some missing vacuum_delay_point calls in GIST vacuuming.
Diffstat (limited to 'src/backend/access/gist/gistvacuum.c')
-rw-r--r-- | src/backend/access/gist/gistvacuum.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/backend/access/gist/gistvacuum.c b/src/backend/access/gist/gistvacuum.c index b96d84fd024..80c694a1978 100644 --- a/src/backend/access/gist/gistvacuum.c +++ b/src/backend/access/gist/gistvacuum.c @@ -8,7 +8,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/gist/gistvacuum.c,v 1.14 2006/02/11 23:31:33 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/access/gist/gistvacuum.c,v 1.15 2006/02/14 16:39:32 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -68,6 +68,8 @@ gistVacuumUpdate(GistVacuum *gv, BlockNumber blkno, bool needunion) int ncompleted = 0, lencompleted = 16; + vacuum_delay_point(); + buffer = ReadBuffer(gv->index, blkno); /* @@ -406,9 +408,12 @@ gistvacuumcleanup(PG_FUNCTION_ARGS) freePages = (BlockNumber *) palloc(sizeof(BlockNumber) * maxFreePages); for (blkno = GIST_ROOT_BLKNO + 1; blkno < npages; blkno++) { - Buffer buffer = ReadBuffer(rel, blkno); + Buffer buffer; Page page; + vacuum_delay_point(); + + buffer = ReadBuffer(rel, blkno); LockBuffer(buffer, GIST_SHARE); page = (Page) BufferGetPage(buffer); @@ -561,7 +566,7 @@ gistbulkdelete(PG_FUNCTION_ARGS) page = (Page) BufferGetPage(buffer); if (stack->blkno == GIST_ROOT_BLKNO && !GistPageIsLeaf(page)) { - /* the only root can become non-leaf during relock */ + /* only the root can become non-leaf during relock */ LockBuffer(buffer, GIST_UNLOCK); ReleaseBuffer(buffer); /* one more check */ @@ -649,7 +654,6 @@ gistbulkdelete(PG_FUNCTION_ARGS) LockBuffer(buffer, GIST_UNLOCK); ReleaseBuffer(buffer); - ptr = stack->next; pfree(stack); stack = ptr; |