Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h8q5i-0002K3-6X for pgsql-hackers@arkaria.postgresql.org; Tue, 26 Mar 2019 17:42:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h8q4i-0003rJ-F4 for pgsql-hackers@arkaria.postgresql.org; Tue, 26 Mar 2019 17:41:24 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h8q1b-0005c4-9L for pgsql-hackers@lists.postgresql.org; Tue, 26 Mar 2019 17:38:11 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h8q1X-0007Hf-7l for pgsql-hackers@postgresql.org; Tue, 26 Mar 2019 17:38:09 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x2QHc0BR021346; Tue, 26 Mar 2019 13:38:00 -0400 From: Tom Lane To: Nikolay Shaplov cc: "pgsql-hackers@postgresql.org" , Julien Rouhaud , Andrew Dunstan , David Rowley , Jeff Janes , Jeremy Schneider , Joe Conway , Peter Geoghegan Subject: Re: [PATCH][HOTFIX] vacuum_cost_delay type change from int to real have not been done everywhere In-reply-to: <4861742.12LTaSB3sv@x200m> References: <4861742.12LTaSB3sv@x200m> Comments: In-reply-to Nikolay Shaplov message dated "Tue, 26 Mar 2019 19:19:50 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <21344.1553621880.1@sss.pgh.pa.us> Date: Tue, 26 Mar 2019 13:38:00 -0400 Message-ID: <21345.1553621880@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Nikolay Shaplov 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