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... 
 
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,

Reply via email to