Re: Autovacuum degrades all other operations by keeping all buffersdirty? - Mailing list pgsql-general

From Andres Freund
Subject Re: Autovacuum degrades all other operations by keeping all buffersdirty?
Date
Msg-id 20180831225047.tamaup2p54ytzikj@alap3.anarazel.de
Whole thread Raw
In response to Re: Autovacuum degrades all other operations by keeping all buffersdirty?  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: Autovacuum degrades all other operations by keeping all buffers dirty?  (David Pacheco <dap@joyent.com>)
List pgsql-general
On 2018-08-31 19:31:47 -0300, Alvaro Herrera wrote:
> On 2018-Aug-31, David Pacheco wrote:
> 
> > From reading the 9.6.3 source, it looks like the autovacuum process
> > itself is single-threaded, and it reads pages essentially linearly
> > from the relation (possibly skipping some).  When the autovacuum
> > process needs to modify a page, it doesn't write it directly, but
> > rather marks the buffer dirty.  The page will be written later,
> 
> Unless there's some bug, there is a BufferAccessStrategy that only lets
> a few dozen buffers go unwritten before the autovac worker process
> itself is forced to write some.

I've not re-checked, but I'm not sure that's true if the buffer is
already in s_b, which it'll be for many workloads.

Greetings,

Andres Freund


pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Autovacuum degrades all other operations by keeping all buffersdirty?
Next
From: Adrian Klaver
Date:
Subject: Re: locate DB corruption