fix AtEOXact_GUC - add missing_ok=true to GetConfigOptionByName()
authorTomas Vondra <[email protected]>
Wed, 9 Nov 2016 14:05:57 +0000 (15:05 +0100)
committerTomas Vondra <[email protected]>
Wed, 9 Nov 2016 14:05:57 +0000 (15:05 +0100)
Maybe this should be 'false' though, not sure.

Also moved the variable into the block, to minimize difference
with respect to upstream.

src/backend/utils/misc/guc.c

index be7adb2ac540b9281061a90b66df9e4a75926a77..eaeaadb9cda0a6b5834754d22b1a08c690f8b5c4 100644 (file)
@@ -5429,7 +5429,6 @@ AtEOXact_GUC(bool isCommit, int nestLevel)
                        bool            restorePrior = false;
                        bool            restoreMasked = false;
                        bool            changed;
-                       const char              *newvalStr = NULL;
 
                        /*
                         * In this next bit, if we don't set either restorePrior or
@@ -5646,7 +5645,11 @@ AtEOXact_GUC(bool isCommit, int nestLevel)
 
                        if (changed)
                        {
-                               newvalStr = GetConfigOptionByName(gconf->name, NULL);
+                               const char              *newvalStr = NULL;
+
+                               /* XXX perhaps this should use is_missing=false, not sure */
+                               newvalStr = GetConfigOptionByName(gconf->name, NULL, true);
+
                                /*
                                 * Quote value if it is including memory or time units
                                 */