Re: auto-sizing wal_buffers

Fujii Masao <masao.fujii@gmail.com>

From: Fujii Masao <masao.fujii@gmail.com>
To: Josh Berkus <josh@agliodbs.com>
Cc: Greg Smith <greg@2ndquadrant.com>, Tom Lane <tgl@sss.pgh.pa.us>, Robert Haas <robertmhaas@gmail.com>, Magnus Hagander <magnus@hagander.net>, pgsql-hackers@postgresql.org
Date: 2011-01-17T01:15:46Z
Lists: pgsql-hackers
On Sun, Jan 16, 2011 at 7:34 AM, Josh Berkus <josh@agliodbs.com> wrote:
> I think we can be more specific on that last sentence; is there even any
> *theoretical* benefit to settings above 16MB, the size of a WAL segment?
>  Certainly there have been no test results to show any.

If the workload generates 16MB or more WAL for wal_writer_delay,
16MB or more of wal_buffers would be effective. In that case,
wal_buffers is likely to be filled up with unwritten WAL, then you have
to write buffers while holding WALInsert lock. This is obviously not
good.

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center