Re: Foreground vacuum and buffer access strategy - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Foreground vacuum and buffer access strategy
Date
Msg-id CAM-w4HOc=t5yMZPu68BFa5WmvUFo5h-h_5GsJ0yxYDbNYDVmBQ@mail.gmail.com
Whole thread Raw
In response to Re: Foreground vacuum and buffer access strategy  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Foreground vacuum and buffer access strategy
Re: Foreground vacuum and buffer access strategy
List pgsql-hackers
On Tue, Aug 13, 2013 at 3:45 PM, Robert Haas <robertmhaas@gmail.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



pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: How to create read-only view on 9.3
Next
From: Josh Berkus
Date:
Subject: Re: How to create read-only view on 9.3