Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZFjRJ-0002kr-3x for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Jul 2015 13:43:05 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZFjRI-0007sT-8H for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Jul 2015 13:43:04 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZFjQ1-0006Nk-Hl for pgsql-hackers@postgresql.org; Thu, 16 Jul 2015 13:41:45 +0000 Received: from mail-ig0-x230.google.com ([2607:f8b0:4001:c05::230]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZFjPu-00070p-Lz for pgsql-hackers@postgresql.org; Thu, 16 Jul 2015 13:41:44 +0000 Received: by iggf3 with SMTP id f3so13556415igg.1 for ; Thu, 16 Jul 2015 06:41:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=MlsoJrKvT4W3nEClrLOGaZ5nCvnCDG4DiIC+oCR853Y=; b=y1QbC6crbZgHdXX49uhbxvNIPmr1wtsj0eOXbjAFaQLEEpe/LUvEXfRfUwXpOVJues dq8aNksmQYB/XihsxEh/6wyfv/oVF6yFSHnvSC4J2XdU8G6+yX+dl7bgqqmXFtfZNR0z rImDC84NDiJ35IfQzMMpQcMr4XdcoVrbAbcbWy9wSqS9jHgCj5EMkZjW1hAdPqxYRTNe dP4/PzXI+hkv59RPCPELRCQ2e6IfaTOEcC17E23F9KQCiFJjkcqxwWbWAUdETp5qPCsk SbI/kam+HNk5igJAc/y7Iz73UhK+c3YFE6U76VrExCAX+5nJPyUtZ8Zfr8nje3/l/a2J EReA== MIME-Version: 1.0 X-Received: by 10.50.178.133 with SMTP id cy5mr3198248igc.5.1437054097916; Thu, 16 Jul 2015 06:41:37 -0700 (PDT) Received: by 10.79.90.193 with HTTP; Thu, 16 Jul 2015 06:41:37 -0700 (PDT) In-Reply-To: References: <20150702141409.GL3289@postgresql.org> Date: Thu, 16 Jul 2015 22:41:37 +0900 Message-ID: Subject: Re: Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file From: Fujii Masao To: Amit Kapila Cc: Alvaro Herrera , Robert Haas , Andrew Dunstan , PostgreSQL-development Content-Type: text/plain; charset=UTF-8 X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On Fri, Jul 3, 2015 at 12:15 PM, Amit Kapila wrote: > On Thu, Jul 2, 2015 at 7:44 PM, Alvaro Herrera > 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