Re: Experimental patch for inter-page delay in VACUUM

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Experimental patch for inter-page delay in VACUUM
Date: 2003-10-31 17:22:50
Message-ID: 3FA29A6A.2000108@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian wrote:

> Tom Lane wrote:
>> "Matthew T. O'Connor" <matthew(at)zeut(dot)net> writes:
>> > Tom Lane wrote:
>> >> 2. I only bothered to insert delays in the processing loops of plain
>> >> VACUUM and btree index cleanup. VACUUM FULL and cleanup of non-btree
>> >> indexes aren't done yet.
>> >>
>> > I thought we didn't want the delay in vacuum full since it locks things
>> > down, we want vacuum full to finish ASAP. As opposed to normal vacuum
>> > which would be fired by the autovacuum daemon.
>>
>> My thought was that it'd be up to the user to set vacuum_page_delay
>> appropriately for what he is doing. It might or might not ever make
>> sense to use a nonzero delay in VACUUM FULL, but the facility should be
>> there. (Since plain and full VACUUM share the same index cleanup code,
>> it would take some klugery to implement a policy of "no delays for
>> VACUUM FULL" anyway.)
>>
>> Best practice would likely be to leave the default vacuum_page_delay at
>> zero, and have the autovacuum daemon set a nonzero value for vacuums it
>> issues.
>
> What is the advantage of delaying vacuum per page vs. just doing vacuum
> less frequently?

It gives regular backends more time to "retouch" the pages they actually
need before they fall off the end of the LRU list.

Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kurt Roeckx 2003-10-31 17:39:47 Re: [HACKERS] Annotated release notes
Previous Message Tom Lane 2003-10-31 17:21:52 Re: PQunescapeBytea code