pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fujii Masao <masao.fujii@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file
Date: Thu, 16 Jul 2015 22:41:37 +0900
Message-ID: <CAHGQGwEd2an6Cv2ikXHnf37XG53RQicEBqGuW+Bi0YkWYezNiw@mail.gmail.com> (raw)
In-Reply-To: <CAA4eK1JNhY6UhH5VQXDWvGYHd3VGyBDT+wqbyvH6BrXEZufotg@mail.gmail.com>
References: <E1YsASW-0000Aa-Ut@gemulon.postgresql.org>
	<CAHGQGwFB+qR+y8r3Gjv+ZCGgU+J_G8ECPQOf5+Nanm9eGXmOTg@mail.gmail.com>
	<CAA4eK1Lb1j8BpT9SgKviZRMVPbZxiFcni1CtYgG6TW6ynAjDtQ@mail.gmail.com>
	<CAHGQGwHjBvnqiqMc1Gn3Qywk4ZUMX51_XikreKj7Jthpc2euVQ@mail.gmail.com>
	<CAA4eK1+yA6d4EVXt3VWBVJ6hg-yU2Y+Q6qZNYwoVCR4-SAWGmw@mail.gmail.com>
	<CAHGQGwHFXyZuNd-_aev+L6-FJwqk50vKyy1jmY0eNy0dEQZbiQ@mail.gmail.com>
	<CAA4eK1+VAikW56kD1cV=237K8+XPatw0VXT_UNeab8T+Y0z2XA@mail.gmail.com>
	<CAA4eK1Lf7qBgKmRYbs1hje9i8RBYe5-nO_a1TT+TY_Aj-6O1Mw@mail.gmail.com>
	<CA+Tgmoa66DQy=LYYr7vSVpkUEK79ec-uRC3p3VL+iwwe1KbEgg@mail.gmail.com>
	<CAA4eK1Lb1DLNf9HB-TZho4N92BvtTBaqCHh+0JwCWwtATi9qEw@mail.gmail.com>
	<20150702141409.GL3289@postgresql.org>
	<CAA4eK1JNhY6UhH5VQXDWvGYHd3VGyBDT+wqbyvH6BrXEZufotg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On Fri, Jul 3, 2015 at 12:15 PM, Amit Kapila <amit.kapila16@gmail.com> wrote:
> On Thu, Jul 2, 2015 at 7:44 PM, Alvaro Herrera <alvherre@2ndquadrant.com>
> wrote:
>>
>> Amit Kapila wrote:
>> >
>> > Added the above log messages in attached patch with small change
>> > such that in message, file names will be displayed with quotes as most
>> > of other usages of rename (failure) in that file uses quotes to display
>> > filenames.
>>
>> Why emit two messages?
>
> not necessary.
>
>>  Can we reduce that to a single one?  Maybe the
>> first one could be errdetail or something.
>>
>
> I think it is better other way (basically have second one as errdetail).
> We already have one similar message in xlog.c that way.
> ereport(LOG,
> (errmsg("online backup mode canceled"),
> errdetail("\"%s\" was renamed to \"%s\".",
>   BACKUP_LABEL_FILE, BACKUP_LABEL_OLD)));
>
> Attached patch consolidates errmsg into one message.

Here are some minor comments:

+                ereport(LOG,
+                        (errmsg("ignoring \"%s\" file because no
\"%s\" file exists",
+                                TABLESPACE_MAP, BACKUP_LABEL_FILE),
+                         errdetail("could not rename file \"%s\" to
\"%s\": %m",
+                                   TABLESPACE_MAP, TABLESPACE_MAP_OLD)));

WARNING is better than LOG here because it indicates a problematic case?

In detail message, the first word of sentence needs to be capitalized.

+                     errdetail("renamed file \"%s\" to \"%s\"",
+                               TABLESPACE_MAP, TABLESPACE_MAP_OLD)));

In detail message, basically we should use a complete sentence.
So like other similar detail messages in xlog.c, I think that it's better
to use "\"%s\" was renamed to \"%s\"." as the detail message here.

Regards,

-- 
Fujii Masao


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (74+ messages)  latest in thread

Message-ID: <CAHGQGwEd2an6Cv2ikXHnf37XG53RQicEBqGuW+Bi0YkWYezNiw@mail.gmail.com>
Permalink:  ../CAHGQGwEd2an6Cv2ikXHnf37XG53RQicEBqGuW+Bi0YkWYezNiw@mail.gmail.com/
Also on:    postgresql.org/message-id/CAHGQGwEd2an6Cv2ikXHnf37XG53RQicEBqGuW+Bi0YkWYezNiw@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: masao.fujii@gmail.com, amit.kapila16@gmail.com, alvherre@2ndquadrant.com, robertmhaas@gmail.com, andrew@dunslane.net, pgsql-hackers@postgresql.org
  Subject: Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file
  In-Reply-To: <CAHGQGwEd2an6Cv2ikXHnf37XG53RQicEBqGuW+Bi0YkWYezNiw@mail.gmail.com>
  References: <E1YsASW-0000Aa-Ut@gemulon.postgresql.org> <CAHGQGwFB+qR+y8r3Gjv+ZCGgU+J_G8ECPQOf5+Nanm9eGXmOTg@mail.gmail.com> <CAA4eK1Lb1j8BpT9SgKviZRMVPbZxiFcni1CtYgG6TW6ynAjDtQ@mail.gmail.com> <CAHGQGwHjBvnqiqMc1Gn3Qywk4ZUMX51_XikreKj7Jthpc2euVQ@mail.gmail.com> <CAA4eK1+yA6d4EVXt3VWBVJ6hg-yU2Y+Q6qZNYwoVCR4-SAWGmw@mail.gmail.com> <CAHGQGwHFXyZuNd-_aev+L6-FJwqk50vKyy1jmY0eNy0dEQZbiQ@mail.gmail.com> <CAA4eK1+VAikW56kD1cV=237K8+XPatw0VXT_UNeab8T+Y0z2XA@mail.gmail.com> <CAA4eK1Lf7qBgKmRYbs1hje9i8RBYe5-nO_a1TT+TY_Aj-6O1Mw@mail.gmail.com> <CA+Tgmoa66DQy=LYYr7vSVpkUEK79ec-uRC3p3VL+iwwe1KbEgg@mail.gmail.com> <CAA4eK1Lb1DLNf9HB-TZho4N92BvtTBaqCHh+0JwCWwtATi9qEw@mail.gmail.com> <20150702141409.GL3289@postgresql.org> <CAA4eK1JNhY6UhH5VQXDWvGYHd3VGyBDT+wqbyvH6BrXEZufotg@mail.gmail.com> <CAHGQGwEd2an6Cv2ikXHnf37XG53RQicEBqGuW+Bi0YkWYezNiw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox