Re: pgsql: Remove function names from error messages

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: pgsql: Remove function names from error messages
Дата
Msg-id 20181220055326.GP27104@paquier.xyz
обсуждение исходный текст
Ответ на Re: pgsql: Remove function names from error messages  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-committers
On Wed, Dec 19, 2018 at 11:39:23PM -0500, Tom Lane wrote:
> Hm, I guess I shouldn't have used the word "localize".  I didn't
> mean whether the function name should be translated; what I meant
> was that we normally don't mention individual functions at all in
> error messages.  The messages are supposed to be written as though
> a monolithic entity "the system" is speaking to you.  So what
> I'd propose here is just
>
>          ereport(NOTICE,
>                  (errmsg("waiting for required WAL segments to be archived")));
>
> or something along that line.  I'm not sure if the "cleanup done" part
> is important, but I'd tend to the idea that it isn't.

Okay.  The cleanup part is roughly about the work of putting all the
shared variables back to an initial state, so indeed that does not
matter much to remove this part.

While at it, I am tempted to rework a bit the comments at the top of
do_pg_start_backup and do_pg_stop_backup as those are not only used for
the SQL-level interface but can also be used for base backups taken with
the replication protocol.

The WARNING about the segments not archived yet should not mention
directly pg_stop_backup as well as BASE_BACKUP never calls it.
--
Michael

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: pgsql: Add more tab completion for CREATE TABLE in psql
Следующее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: DETACH PARTITION: hold locks on indexes until end oftransaction