Re: auto-sizing wal_buffers

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Greg Smith <greg(at)2ndquadrant(dot)com>, Fujii Masao <masao(dot)fujii(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-23 03:12:16
Message-ID: 1334.1295752336@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Sat, Jan 22, 2011 at 9:42 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-01-23 03:13:43 Re: Bug in pg_describe_object, patch v2
Previous Message Robert Haas 2011-01-23 02:55:55 Re: Bug in pg_describe_object, patch v2