Re: auto-sizing wal_buffers
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Jaime Casanova <jaime@2ndquadrant.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-22T14:54:53Z
Lists: pgsql-hackers
On Sat, Jan 22, 2011 at 1:30 AM, Jaime Casanova <jaime@2ndquadrant.com> wrote: > 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; Oh, good point. Woops. > also this > + Assert(XLOGbuffers > 0); > maybe should be > Assert(XLOGbuffers >= XLOG_BUFFER_MIN); I think that's slightly less clear about the point of the assertion, which is to make sure we're at least allocating something. > while you move the code, why didn't you keep this comment? > - /* > - * Use int64 arithmetic to avoid overflows in units > - * conversion. > - */ Because I suck. Will fix. Thanks for the fast and detailed review. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company