From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nikolay Shaplov <dhyan@nataraj.su>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Cc: Julien Rouhaud <rjuju123@gmail.com>
Cc: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Cc: David Rowley <david.rowley@2ndquadrant.com>
Cc: Jeff Janes <jeff.janes@gmail.com>
Cc: Jeremy Schneider <schnjere@amazon.com>
Cc: Joe Conway <mail@joeconway.com>
Cc: Peter Geoghegan <pg@bowt.ie>
Subject: Re: [PATCH][HOTFIX] vacuum_cost_delay type change from int to real have not been done everywhere
Date: Tue, 26 Mar 2019 13:38:00 -0400
Message-ID: <21345.1553621880@sss.pgh.pa.us> (raw)
In-Reply-To: <4861742.12LTaSB3sv@x200m>
References: <4861742.12LTaSB3sv@x200m>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, dhyan@nataraj.su, rjuju123@gmail.com, andrew.dunstan@2ndquadrant.com, david.rowley@2ndquadrant.com, jeff.janes@gmail.com, schnjere@amazon.com, mail@joeconway.com, pg@bowt.ie
Subject: Re: [PATCH][HOTFIX] vacuum_cost_delay type change from int to real have not been done everywhere
In-Reply-To: <21345.1553621880@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox