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

From Tom Lane
Subject Re: auto-sizing wal_buffers
Date
Msg-id 1334.1295752336@sss.pgh.pa.us
Whole thread Raw
In response to Re: auto-sizing wal_buffers  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Sat, Jan 22, 2011 at 9:42 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> It does strike me that we could provide SetConfigOptionInt,
>> SetConfigOptionBool, and SetConfigOptionReal for the benefit of callers
>> who'd prefer to pass values in those formats. �They'd still do sprintf
>> internally, but this would make the call sites a bit cleaner.

> Why do we need to double the conversion in the first place?

Because most of the processing in set_config_option is independent of
the type of the GUC variable.  Maybe it could be refactored, but I don't
think it would come out prettier, nor faster.  Again, the important code
paths are starting from string values anyway --- I don't think we should
contort the design of guc.c to serve a small minority of callers at the
expense of complicating the normal cases.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Bug in pg_describe_object, patch v2
Next
From: Tom Lane
Date:
Subject: Re: Bug in pg_describe_object, patch v2