Thread

Commits

  1. Fix oversight in data-type change for autovacuum_vacuum_cost_delay.

  1. [PATCH][HOTFIX] vacuum_cost_delay type change from int to real have not been done everywhere

    Nikolay Shaplov <dhyan@nataraj.su> — 2019-03-26T16:19:50Z

    Hi!
    
    In caf626b2 type of vacuum_cost_delay have been switched from int to real, 
    everywhere, but not in *RelOpts[] arrays.
    
    For some reason it continued to build and work. But I think it is better to 
    move vacuum_cost_delay from int to real there too...
    
    Patch attached.
    
    PS. As you can see current reloption code is error-prone. To properly change 
    reloptions you should simultaneously change code in several different places, 
    and as you can see, it may not report if you missed something.
    I am working on reloptions code refactoring now, please join reviewing my 
    patches. This work is important as you can see from this example... 
     
    
  2. Re: [PATCH][HOTFIX] vacuum_cost_delay type change from int to real have not been done everywhere

    Tom Lane <tgl@sss.pgh.pa.us> — 2019-03-26T17:38:00Z

    Nikolay Shaplov <dhyan@nataraj.su> writes:
    > In caf626b2 type of vacuum_cost_delay have been switched from int to real, 
    > everywhere, but not in *RelOpts[] arrays.
    
    Ugh.
    
    > For some reason it continued to build and work.
    
    I'm not quite sure why it worked either; apparently, the type of that
    array entry doesn't have anything to do with the variable's storage
    format.  The bounds-check code must think it's dealing with an integer,
    but that doesn't matter either for the values we need.
    
    > PS. As you can see current reloption code is error-prone.
    
    Yeah, that was pretty obvious already :-(.  Having more than one place
    defining the type of an option is clearly bogus.  I missed that this
    entry was type-specific because you'd really have to go up to the top
    of the array to notice that; and since the type information *is* contained
    in another entry, my bogometer failed to trigger.
    
    Fix pushed, thanks for the report!
    
    			regards, tom lane