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

From Jaime Casanova
Subject Re: auto-sizing wal_buffers
Date
Msg-id AANLkTiki2K9U8SUcww=3hsuXF-JAx_O2bqdy8UkWFUdH@mail.gmail.com
Whole thread Raw
In response to Re: auto-sizing wal_buffers  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: auto-sizing wal_buffers  (Robert Haas <robertmhaas@gmail.com>)
List 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


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: auto-sizing wal_buffers
Next
From: Hitoshi Harada
Date:
Subject: Re: REVIEW: EXPLAIN and nfiltered