[PATCH][HOTFIX] vacuum_cost_delay type change from int to real have not been done everywhere
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...
Attachments:
vacuum_cost_delay_hotfix_1.difftext/x-patch; charset=UTF-8; name=vacuum_cost_delay_hotfix_1.diffDownload+10-9
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