Re: add the source of param misconfigurations to error messages

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: add the source of param misconfigurations to error messages
Дата
Msg-id 20181113224227.awvsopcv6t7sqidy@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: add the source of param misconfigurations to error messages  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: add the source of param misconfigurations to error messages
Список pgsql-hackers
Hi,

On 2018-11-13 17:33:01 -0500, Tom Lane wrote:
> Jordan Deitch <jd@rsa.pub> writes:
> > $ postgres --config-file="/etc/postgresql/10/main/postgresql.conf"
> > can fail with the following error:
> > postgres: superuser_reserved_connections must be less than max_connections
> 
> > This is due to the addition of the postgresql.auto.conf params. 
> > Would the community welcome a patch whereby this detail in contained in the error? 
> 
> Seems to me it'd result in an impossibly unwieldy message, especially
> once you realize you might have to deal with other value sources than
> files.  Adhering to the translatability guidelines (ie, "don't construct
> messages out of parts") would be problematic for that too.

Note that I'm convinced this is a necessary feature.  But if we were to
do it, I'd assume we put something like this in the DETAIL not the
ERROR itself. That ought to alievate some of those concerns?


> We already have fairly substantial support for diagnosing such mistakes
> through the pg_file_settings view, though admittedly if you don't use
> that *before* restarting the server, it does not help with this.

Would be kind of useful if --describe-config, or a version thereof,
would print that kind of information too.

Greetings,

Andres Freund


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [PATCH] Pass COPT and PROFILE to CXXFLAGS as well
Следующее
От: Tom Lane
Дата:
Сообщение: Re: add the source of param misconfigurations to error messages