Re: auto-sizing wal_buffers

Josh Berkus <josh@agliodbs.com>

From: Josh Berkus <josh@agliodbs.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Magnus Hagander <magnus@hagander.net>, Greg Smith <greg@2ndquadrant.com>, pgsql-hackers@postgresql.org
Date: 2011-01-13T23:20:00Z
Lists: pgsql-hackers
Robert,

>> Unfortunately, we might still need a manual parameter for override
>> because of the interaction between wal_buffers and
>> synchronous_commit=off, since it sets the max size of the unflushed data
>> buffer.  Discuss?
> 
> Do we have any evidence there's actually a problem in that case, or
> that a larger value of wal_buffers solves it?  I mean, the background
> writer is going to start a background flush as quickly as it can...

I don't think anyone has done any testing.  However, the setting is
there and some users might be convinced that they need it.

>> And the "auto" setting should be -1, not 0kB.  We use -1 for "use
>> default" for several other GUCs.
> 
> No can do.  Gotta have things in the same units.

That's certainly not true with, for example, log_temp_files.

-- 
                                  -- Josh Berkus
                                     PostgreSQL Experts Inc.
                                     http://www.pgexperts.com