From: Nikolay Shaplov <dhyan@nataraj.su>
To: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
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: [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> (raw)
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:
[text/x-patch] vacuum_cost_delay_hotfix_1.diff (1.1K, ../4861742.12LTaSB3sv@x200m/2-vacuum_cost_delay_hotfix_1.diff)
download | inline diff:diff --git a/.gitignore b/.gitignoreindex 794e35b..37331c2 100644diff --git a/src/backend/access/common/reloptions.c b/src/backend/access/common/reloptions.cindex 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,
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: dhyan@nataraj.su, tgl@sss.pgh.pa.us, 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: <4861742.12LTaSB3sv@x200m>
* 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