Hi hacker,
At the moment the only requirement for custom parameter names is that they should have one or more dots.
For example:
test5=# set a.b.c.d = 1;
SET
test5=# show a.b.c.d;
a.b.c.d
---------
1
(1 row)
But, Postgres fails to start if such parameters are set in the configuration file with the following error:
LOG: syntax error in file "/tmp/cluster/postgresql.auto.conf" line 8, near token "a.b.c.d"
FATAL: configuration file "postgresql.auto.conf" contains errors
What is more fun, ALTER SYSTEM allows writing such parameters to the postgresql.auto.conf file if they are defined in a session:
test5=# show a.b.c.d;
ERROR: unrecognized configuration parameter "a.b.c.d"
test5=# alter system set a.b.c.d = 1;
ERROR: unrecognized configuration parameter "a.b.c.d"
test5=# set a.b.c.d = 1;
SET
test5=# alter system set a.b.c.d = 1;
ALTER SYSTEM
In my opinion it would be fair to make parsing of config files with the rest of the code responsible for GUC handling by allowing custom parameters containing more than one dot.
The fix is rather simple, please find the patch attached.
Regards,
--
Alexander Kukushkin