Allow custom parameters with more than one dot in config files.

Поиск
Список
Период
Сортировка
От Alexander Kukushkin
Тема Allow custom parameters with more than one dot in config files.
Дата
Msg-id CAFh8B==xZ_qJNPtyajD5FSZbLKKXiOKv9Hoj08vcUHeo1rcoqw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Allow custom parameters with more than one dot in config files.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Sergei Kornilov
Дата:
Сообщение: Re:pg_waldump
Следующее
От: Christophe Pettus
Дата:
Сообщение: Re: logical decoding and replication of sequences, take 2