Re: auto-sizing wal_buffers

From: Greg Smith <greg(at)2ndquadrant(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: auto-sizing wal_buffers
Date: 2011-01-18 11:50:52
Message-ID: 4D357E9C.6080206@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)2ndQuadrant(dot)com Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us
"PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2011-01-18 11:55:34 Re: auto-sizing wal_buffers
Previous Message Magnus Hagander 2011-01-18 11:40:50 Re: pg_basebackup for streaming base backups