Hi,

Postgres's describe-config option prints reset_val for int & real
configuration parameters which is not useful as it is not updated.
Printing boot_val is better in this case. reset_val is updated with
boot_val while the server is getting started but in case of postgres
--describe-config this value is not updated. I felt printing boot_val
is more appropriate in this case. Attached patch for the same.
Thoughts?

Regards,
Vignesh
EnterpriseDB: http://www.enterprisedb.com
From 847406e95ed35b5ce77c407a4b1b990e42e49125 Mon Sep 17 00:00:00 2001
From: Vignesh C <vignes...@gmail.com>
Date: Wed, 2 Sep 2020 10:06:06 +0530
Subject: [PATCH] describe-config issue

describe-config prints reset_val for int & real configuration parameters which
is not useful as it is not updated. Printing boot_val is better in this case.
---
 src/backend/utils/misc/help_config.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/backend/utils/misc/help_config.c b/src/backend/utils/misc/help_config.c
index c0120e1..7e5338a 100644
--- a/src/backend/utils/misc/help_config.c
+++ b/src/backend/utils/misc/help_config.c
@@ -103,14 +103,14 @@ printMixedStruct(mixedStruct *structToPrint)
 
 		case PGC_INT:
 			printf("INTEGER\t%d\t%d\t%d\t",
-				   structToPrint->integer.reset_val,
+				   structToPrint->integer.boot_val,
 				   structToPrint->integer.min,
 				   structToPrint->integer.max);
 			break;
 
 		case PGC_REAL:
 			printf("REAL\t%g\t%g\t%g\t",
-				   structToPrint->real.reset_val,
+				   structToPrint->real.boot_val,
 				   structToPrint->real.min,
 				   structToPrint->real.max);
 			break;
-- 
1.8.3.1

Reply via email to