Re: auto-sizing wal_buffers
Jaime Casanova <jaime@2ndquadrant.com>
From: Jaime Casanova <jaime@2ndquadrant.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Greg Smith <greg@2ndquadrant.com>, Fujii Masao <masao.fujii@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Magnus Hagander <magnus@hagander.net>, pgsql-hackers@postgresql.org
Date: 2011-01-22T06:30:32Z
Lists: pgsql-hackers
On Sat, Jan 22, 2011 at 12:33 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Sat, Jan 15, 2011 at 11:52 AM, Greg Smith <greg@2ndquadrant.com> wrote:
>> Where I was expecting that setting to be "4" instead for 32kB. So there's
>> probably some minor bug left in where I inserted this into the
>> initialization sequence.
>
> So I exposed the relevant formatting logic from guc.c as a separate function
i have read this very breafly, so not much comment... just a few questions...
why is this better than using XLOG_BUFFER_MIN? (the same for the 8
buffers assigned just above of it)
+ else if (XLOGbuffers < 4)
+ XLOGbuffers = 4;
also this
+ Assert(XLOGbuffers > 0);
maybe should be
Assert(XLOGbuffers >= XLOG_BUFFER_MIN);
while you move the code, why didn't you keep this comment?
- /*
- * Use int64 arithmetic to avoid overflows in units
- * conversion.
- */
--
Jaime Casanova www.2ndQuadrant.com
Professional PostgreSQL: Soporte y capacitación de PostgreSQL