Re: Foreground vacuum and buffer access strategy

From: Greg Stark <stark(at)mit(dot)edu>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Foreground vacuum and buffer access strategy
Date: 2013-08-13 20:11:52
Message-ID: CAM-w4HOc=t5yMZPu68BFa5WmvUFo5h-h_5GsJ0yxYDbNYDVmBQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 13, 2013 at 3:45 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> I'm not sure what the right thing to do here is, but I definitely
> agree there's a problem. There are definitely cases where people want
> or indeed need to vacuum as fast as possible, and using a small ring
> buffer is not the way to do that.

I'm not convinced using a ring buffer is necessarily that bad even if
you want to vacuum as fast as possible. The reason we use a small ring
buffer is to avoid poisoning the entire cache with vacuum pages, not
to throttle the speed of vacuum by introducing synchronous wal
flushes.

I think we should increase the size of the ring buffer if we hit a
synchronous wal buffer flush and there is less than some amount of wal
pending. That amount is the relevant thing people might want to limit
to avoid slowing down other transaction commits. The walwriter might
even provide a relevant knob already for how much wal should be the
maximum pending.

--
greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2013-08-13 20:24:27 Re: How to create read-only view on 9.3
Previous Message David Fetter 2013-08-13 19:57:14 Re: How to create read-only view on 9.3