Re: pgsql: Remove function names from error messages - Mailing list pgsql-committers

From Michael Paquier
Subject Re: pgsql: Remove function names from error messages
Date
Msg-id 20181220055326.GP27104@paquier.xyz
Whole thread Raw
In response to Re: pgsql: Remove function names from error messages  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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

Attachment

pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: pgsql: Add more tab completion for CREATE TABLE in psql
Next
From: Alvaro Herrera
Date:
Subject: pgsql: DETACH PARTITION: hold locks on indexes until end oftransaction