Re: auto-sizing wal_buffers - Mailing list pgsql-hackers

From Greg Smith
Subject Re: auto-sizing wal_buffers
Date
Msg-id 4D357E9C.6080206@2ndquadrant.com
Whole thread Raw
In response to Re: auto-sizing wal_buffers  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: auto-sizing wal_buffers
List pgsql-hackers
Fujii Masao wrote:
> +/* Minimum setting used for a lower bound on wal_buffers */
> +#define XLOG_BUFFER_MIN            4
>
> Why didn't you use XLOG_BUFFER_MIN instead of XLOGbuffersMin?
> XLOG_BUFFER_MIN is not used anywhere for now.
>   

That's a typo; will fix.

> +        if (XLOGbuffers < (XLOGbuffersMin * 2))
> +            XLOGbuffers = XLOGbuffersMin * 2;
> +        }
>
> Why is the minimum value 64kB only when wal_buffers is set to
> -1? This seems confusing for users.
>   

That's because the current default on older versions is 64kB.  Since the 
automatic selection is going to be the new default, I hope, I don't want 
it to be possible it will pick a number smaller than the default of 
older versions.  So the automatic lower limit is 64kB, while the actual 
manually set lower limit remains 32kB, as before.

-- 
Greg Smith   2ndQuadrant US    greg@2ndQuadrant.com   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support  www.2ndQuadrant.us
"PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books



pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: pg_basebackup for streaming base backups
Next
From: Greg Smith
Date:
Subject: Re: auto-sizing wal_buffers