From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | Greg Smith <greg(at)2ndquadrant(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-17 01:07:16 |
Message-ID: | AANLkTi=hsuB-5aBBFwwA-mhDgezM91tt+uXPofY7Gjyc@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Jan 16, 2011 at 1:52 AM, Greg Smith <greg(at)2ndquadrant(dot)com> wrote:
> Fujii Masao wrote:
>>
>> +int XLOGbuffersMin = 8;
>>
>> XLOGbuffersMin is a fixed value. I think that defining it as a macro
>> rather than a variable seems better.
>>
>> + if (XLOGbuffers > 2048)
>> + XLOGbuffers = 2048;
>>
>> Using "XLOG_SEG_SIZE/XLOG_BLCKSZ" rather than 2048 seems
>> better.
>>
>> +#wal_buffers = -1 # min 32kB, -1 sets based on
>> shared_buffers
>>
>> Typo: s/32kB/64kB
>>
>
> Thanks, I've fixed all these issues and attached a new full patch, pushed to
> github, etc. Tests give same results back, and it's nice that it scale to
> reasonable behavior if someone changes their XLOG segment size.
Thanks for the update.
+/* 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.
+ 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.
Regards,
--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2011-01-17 01:12:15 | Re: LOCK for non-tables |
Previous Message | Jeff Janes | 2011-01-17 00:32:55 | Re: Spread checkpoint sync |