Add errdetail for bail_out errors in guc_file.l

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Add errdetail for bail_out errors in guc_file.l
Дата
Msg-id CALj2ACVpxCywwPHcTcddAfq9y7C9r7AL7=rrx71jEwLRRwAXtw@mail.gmail.com
обсуждение исходный текст
Список pgsql-hackers
Hi,

Currently the following messages are shown in server log if bail_out
errors occur in guc_file.l. This leaves the (naive) users with no clue
as to where to look for the exact errors:
errmsg("configuration file \"%s\" contains errors",
errmsg("configuration file \"%s\" contains errors; unaffected changes
were applied",
errmsg("configuration file \"%s\" contains errors; no changes were applied",
2021-09-22 15:16:45.788 UTC [8241] LOG:  configuration file
"/home/uuser/postgres/inst/bin/data/postgresql.auto.conf" contains
errors; unaffected changes were applied

But the user can get to know the parameters for which the errors
happened via pg_file_settings view or pg_show_all_file_settings(). Can
we specify this information in the errdetail for these bail_out
errors, something like errdetail("See pg_file_settings view for more
information.") or errdetail("Check pg_file_settings view for the
errors.") or some other better wording?

In the same guc_file.l for parse_error, a clear indication (line
number and near end of line or near token) is provided, so that users
can easily identify where the error was.
2021-09-22 15:17:11.051 UTC [8241] LOG:  syntax error in file
"/home/bharath/postgres/inst/bin/data/postgresql.auto.conf" line 3,
near end of line

Thoughts?

Regards,
Bharath Rupireddy.



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: relation OID in ReorderBufferToastReplace error message
Следующее
От: wenjing
Дата:
Сообщение: Re: [Proposal] Global temporary tables