diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/commands/vacuum.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c index 694d0e8bbc1..8c4f9985e3f 100644 --- a/src/backend/commands/vacuum.c +++ b/src/backend/commands/vacuum.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.189 2001/03/25 23:23:58 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.189.2.1 2001/06/29 16:34:49 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -577,7 +577,6 @@ scan_heap(VRelStats *vacrelstats, Relation onerel, maxoff; bool pgchanged, tupgone, - dobufrel, notup; char *relname; VacPage vacpage, @@ -876,15 +875,6 @@ scan_heap(VRelStats *vacrelstats, Relation onerel, } } - if (pgchanged) - { - WriteBuffer(buf); - dobufrel = false; - changed_pages++; - } - else - dobufrel = true; - if (tempPage != (Page) NULL) { /* Some tuples are gone */ PageRepairFragmentation(tempPage, NULL); @@ -900,8 +890,15 @@ scan_heap(VRelStats *vacrelstats, Relation onerel, free_size += vacpage->free; reap_page(vacuum_pages, vacpage); } - if (dobufrel) + + if (pgchanged) + { + WriteBuffer(buf); + changed_pages++; + } + else ReleaseBuffer(buf); + if (notup) empty_end_pages++; else |