1Empty the pg_config system information view. This view keeps references to
2several -dev outputs, which we want to avoid to keep closure size down.
3
4The alternative to this patch would be to nuke references across the board,
5but this will also affect the output of the pg_config utility. By emptying
6the view only, we keep the pg_config binary intact. It resides in the -dev
7output, so it's fine to have all those references there.
8
9---
10--- a/src/backend/utils/misc/pg_config.c
11+++ b/src/backend/utils/misc/pg_config.c
12@@ -69,16 +69,6 @@ pg_config(PG_FUNCTION_ARGS)
13 /* initialize our tuplestore */
14 tupstore = tuplestore_begin_heap(true, false, work_mem);
15
16- configdata = get_configdata(my_exec_path, &configdata_len);
17- for (i = 0; i < configdata_len; i++)
18- {
19- values[0] = configdata[i].name;
20- values[1] = configdata[i].setting;
21-
22- tuple = BuildTupleFromCStrings(attinmeta, values);
23- tuplestore_puttuple(tupstore, tuple);
24- }
25-
26 /*
27 * no longer need the tuple descriptor reference created by
28 * TupleDescGetAttInMetadata()
29--- a/src/test/regress/expected/sysviews.out
30+++ b/src/test/regress/expected/sysviews.out
31@@ -20,7 +20,7 @@ select count(*) >= 0 as ok from pg_available_extensions;
32 (1 row)
33
34 -- At introduction, pg_config had 23 entries; it may grow
35-select count(*) > 20 as ok from pg_config;
36+select count(*) = 0 as ok from pg_config;
37 ok
38 ----
39 t
40--- a/src/test/regress/sql/sysviews.sql
41+++ b/src/test/regress/sql/sysviews.sql
42@@ -13,7 +13,7 @@ select count(*) >= 0 as ok from pg_available_extension_versions;
43 select count(*) >= 0 as ok from pg_available_extensions;
44
45 -- At introduction, pg_config had 23 entries; it may grow
46-select count(*) > 20 as ok from pg_config;
47+select count(*) = 0 as ok from pg_config;
48
49 -- We expect no cursors in this test; see also portals.sql
50 select count(*) = 0 as ok from pg_cursors;