Re: Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file
Date: 2015-09-11 04:40:05
Message-ID: CAHGQGwHJDZykUcuEmGmWXC7FAk9V_yiiKrqpx0mzr4dmm+1LZw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Fri, Sep 11, 2015 at 5:43 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Thu, Sep 10, 2015 at 3:52 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>>> On Wed, Sep 9, 2015 at 11:49 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>>>> - errdetail("Could not rename \"%s\" to \"%s\": %m.",
>>>> + errdetail("\"%s\" could not be renamed to \"%s\": %m.",
>>>>
>>>> Is there any reason to change this message?
>>>> I think you have changed this message to make it somewhat similar with
>>>> the new message we are planning to use in this function, but I don't see
>>>> that as compelling reason to change this message.
>>
>>> The old message better follows the guidelines. See section 51.3.7:
>>> Avoid Passive Voice. The old message is what's called
>>> "telegram-style", with PostgreSQL itself as the implicit subject. The
>>> proposed replacement is just the regular old passive voice.
>>
>> Neither version is following the guidelines very well, in particular they
>> should be mentioning what kind of object %s is (file? table? tablespace?).
>> But to me the "could not be renamed" version seems to be closer to the
>> spirit of the "use complete sentences" rule for errdetail. The other one
>> seems better fit for a primary error message, which is supposed to be
>> kept short.
>
> Hmm, I did miss the fact that this was an errdetail(). I agree that
> the object type should be mentioned either way.

So I added the object type, i.e., file in this case, to the errdetail
messages. Attached is the updated version of the patch.

I also changed other log messages related to tablespace_map
so that they follow the style guide.

Regards,

--
Fujii Masao

Attachment Content-Type Size
improve_cancelbackup_messages_v2.patch text/x-patch 2.9 KB

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2015-09-11 04:57:10 Re: Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file
Previous Message Fujii Masao 2015-09-11 04:03:37 pgsql: Correct description of PageHeaderData layout in documentation

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2015-09-11 04:57:10 Re: Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file
Previous Message Kyotaro HORIGUCHI 2015-09-11 04:37:55 Parser emits mysterious error message for very long tokens