Repository: edgedb/edgedb

Issue:
Update createdb.rst
SDL commit missing final COMMIT command.


Discussion:

Resolving patch:
diff --git a/edb/pgsql/metaschema.py b/edb/pgsql/metaschema.py
--- a/edb/pgsql/metaschema.py
+++ b/edb/pgsql/metaschema.py
@@ -2063,7 +2063,8 @@ class SysConfigFunction(dbops.Function):
                         (s.value->>'internal')::bool AS internal,
                         (s.value->>'system')::bool AS system,
                         (s.value->>'typeid')::uuid AS typeid,
-                        (s.value->>'typemod') AS typemod
+                        (s.value->>'typemod') AS typemod,
+                        (s.value->>'backend_setting') AS backend_setting
                     FROM
                         jsonb_each(edgedbinstdata.__syscache_configspec()) AS s
                     ),
@@ -2110,7 +2111,7 @@ class SysConfigFunction(dbops.Function):
 
                 config_backend AS
                     (SELECT
-                        name,
+                        spec.name,
                         to_jsonb(CASE WHEN u.v[1] IS NOT NULL
                          THEN (setting::int * (u.v[1])::int)::text || u.v[2]
                          ELSE setting || COALESCE(unit, '')
@@ -2123,14 +2124,12 @@ class SysConfigFunction(dbops.Function):
                         LATERAL
                         (SELECT
                             regexp_match(pg_settings.unit, '(\\d+)(\\w+)') AS v
-                        ) AS u
-                     WHERE name = any(ARRAY[
-                         'shared_buffers',
-                         'work_mem',
-                         'effective_cache_size',
-                         'effective_io_concurrency',
-                         'default_statistics_target'
-                     ])
+                        ) AS u,
+                        LATERAL
+                        (SELECT config_spec.name
+                         FROM config_spec
+                         WHERE pg_settings.name = config_spec.backend_setting
+                        ) AS spec
                     )
 
             SELECT
diff --git a/edb/server/config/ops.py b/edb/server/config/ops.py
--- a/edb/server/config/ops.py
+++ b/edb/server/config/ops.py
@@ -205,6 +205,7 @@ def spec_to_json(spec: spec.Spec):
             'system': setting.system,
             'typeid': str(typeid),
             'typemod': str(typemod),
+            'backend_setting': setting.backend_setting,
         }
 
     return json.dumps(dct)
diff --git a/edb/server/defines.py b/edb/server/defines.py
--- a/edb/server/defines.py
+++ b/edb/server/defines.py
@@ -27,7 +27,7 @@
 EDGEDB_VISIBLE_METADATA_PREFIX = r'EdgeDB metadata follows, do not modify.\n'
 
 # Increment this whenever the database layout or stdlib changes.
-EDGEDB_CATALOG_VERSION = 2020_07_01_00_00
+EDGEDB_CATALOG_VERSION = 2020_07_13_00_00
 
 # Resource limit on open FDs for the server process.
 # By default, at least on macOS, the max number of open FDs


Test patch:
diff --git a/tests/test_server_config.py b/tests/test_server_config.py
--- a/tests/test_server_config.py
+++ b/tests/test_server_config.py
@@ -304,6 +304,7 @@ def test_server_config_05(self):
         self.assertEqual(
             json.loads(j)['bool'],
             {
+                'backend_setting': None,
                 'default': True,
                 'internal': False,
                 'system': False,