Re: Specifying the unit in storage parameter - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Specifying the unit in storage parameter
Date
Msg-id CAHGQGwE2tmsWQf7vQAPJkDoiJnrp9AG+6i5Fa=tzb_G6QGBY4g@mail.gmail.com
Whole thread Raw
In response to Re: Specifying the unit in storage parameter  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: Specifying the unit in storage parameter
List pgsql-hackers
On Fri, Aug 8, 2014 at 12:56 PM, Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:
> Fujii Masao wrote:
>> Hi,
>>
>> We can specify the unit when setting autovacuum_vacuum_cost_delay
>> GUC as follows.
>>
>>     ALTER SYSTEM SET autovacuum_vacuum_cost_delay TO '80ms';
>>
>> OTOH we cannot specify the unit when setting autovacuum_vacuum_cost_delay
>> as storage parameter as follows.
>>
>>     CREATE TABLE test (col1 int) WITH (autovacuum_vacuum_cost_delay = '80ms');
>>     ERROR:  invalid value for integer option
>> "autovacuum_vacuum_cost_delay": 80ms
>>
>> This is not user-friendly.
>
> No disagreement here.
>
>> I'd like to propose the attached patch which
>> introduces the infrastructure which allows us to specify the unit when
>> setting INTEGER storage parameter like autovacuum_vacuum_cost_delay.
>> Comment? Review?
>
> Hm, what's with the parse_int signature change and the hintmsg thing?
> Is it just me or the patch is incomplete?

Sorry, probably I failed to see your point. You mean that the signature
of parse_int needs to be changed so that it includes the hintmsg as the
argument? If yes, there is no problem. Both signature and function body
of parse_int has already included the hingmsg as the argument so far.
Am I missing something?

Regards,

-- 
Fujii Masao



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: postgresql.auto.conf and reload
Next
From: Alvaro Herrera
Date:
Subject: Re: Specifying the unit in storage parameter