Re: pgsql: Remove function names from error messages

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Remove function names from error messages
Date: 2018-12-20 05:53:26
Message-ID: 20181220055326.GP27104@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
func-message-clean-v2.patch text/x-diff 2.5 KB

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2018-12-20 14:32:59 pgsql: DETACH PARTITION: hold locks on indexes until end of transaction
Previous Message Michael Paquier 2018-12-20 05:32:40 pgsql: Add more tab completion for CREATE TABLE in psql