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 1h8oo3-0006Gs-9m for pgsql-hackers@arkaria.postgresql.org; Tue, 26 Mar 2019 16:20:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h8oo1-0003rH-8z for pgsql-hackers@arkaria.postgresql.org; Tue, 26 Mar 2019 16:20:05 +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 1h8oo0-0003rA-U6 for pgsql-hackers@lists.postgresql.org; Tue, 26 Mar 2019 16:20:05 +0000 Received: from ssl.nataraj.su ([195.54.209.170]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h8ont-0005OQ-Hv for pgsql-hackers@postgresql.org; Tue, 26 Mar 2019 16:20:03 +0000 Received: from x200m.localnet (unknown [94.19.6.228]) by ssl.nataraj.su (Postfix) with ESMTPSA id 97464511E054; Tue, 26 Mar 2019 19:19:54 +0300 (MSK) From: Nikolay Shaplov To: "pgsql-hackers@postgresql.org" Cc: Tom Lane , Julien Rouhaud , Andrew Dunstan , David Rowley , Jeff Janes , Jeremy Schneider , Joe Conway , Peter Geoghegan Subject: [PATCH][HOTFIX] vacuum_cost_delay type change from int to real have not been done everywhere Date: Tue, 26 Mar 2019 19:19:50 +0300 Message-ID: <4861742.12LTaSB3sv@x200m> User-Agent: KMail/5.2.3 (Linux/4.9.0-8-amd64; KDE/5.28.0; x86_64; ; ) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart3347801.zNWN6PLXBM" Content-Transfer-Encoding: 7Bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --nextPart3347801.zNWN6PLXBM Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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... --nextPart3347801.zNWN6PLXBM Content-Disposition: attachment; filename="vacuum_cost_delay_hotfix_1.diff" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="vacuum_cost_delay_hotfix_1.diff" diff --git a/.gitignore b/.gitignore index 794e35b..37331c2 100644 diff --git a/src/backend/access/common/reloptions.c b/src/backend/access/common/reloptions.c index 3b0b138..ba90235 100644 --- a/src/backend/access/common/reloptions.c +++ b/src/backend/access/common/reloptions.c @@ -214,15 +214,6 @@ static relopt_int intRelOpts[] = }, { { - "autovacuum_vacuum_cost_delay", - "Vacuum cost delay in milliseconds, for autovacuum", - RELOPT_KIND_HEAP | RELOPT_KIND_TOAST, - ShareUpdateExclusiveLock - }, - -1, 0, 100 - }, - { - { "autovacuum_vacuum_cost_limit", "Vacuum cost amount available before napping, for autovacuum", RELOPT_KIND_HEAP | RELOPT_KIND_TOAST, @@ -366,6 +357,16 @@ static relopt_real realRelOpts[] = }, { { + "autovacuum_vacuum_cost_delay", + "Vacuum cost delay in milliseconds, for autovacuum", + RELOPT_KIND_HEAP | RELOPT_KIND_TOAST, + ShareUpdateExclusiveLock + }, + -1, 0, 100 + }, + + { + { "seq_page_cost", "Sets the planner's estimate of the cost of a sequentially fetched disk page.", RELOPT_KIND_TABLESPACE, --nextPart3347801.zNWN6PLXBM--