Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YuOGE-0004SF-0J for pgsql-committers@arkaria.postgresql.org; Mon, 18 May 2015 16:51:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YuOGD-0001bH-HZ for pgsql-committers@arkaria.postgresql.org; Mon, 18 May 2015 16:51:25 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YuOGC-0001bB-R8 for pgsql-committers@postgresql.org; Mon, 18 May 2015 16:51:25 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1YuOGA-0002Bt-8a for pgsql-committers@postgresql.org; Mon, 18 May 2015 16:51:23 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t4IGpEQL021964; Mon, 18 May 2015 12:51:14 -0400 From: Tom Lane To: Robert Haas cc: Bruce Momjian , pgsql-committers Subject: Re: pgsql: Recursively fsync() the data directory after a crash. In-reply-to: References: <555943FB.8090703@gmx.net> <14375.1431961473@sss.pgh.pa.us> <20913.1431965703@sss.pgh.pa.us> <20150518162201.GF9458@momjian.us> <21592.1431967153@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Mon, 18 May 2015 12:43:40 -0400" Date: Mon, 18 May 2015 12:51:14 -0400 Message-ID: <21963.1431967874@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org Robert Haas writes: > On Mon, May 18, 2015 at 12:39 PM, Tom Lane wrote: >> Better an untranslated message than a translated one that lacks critical >> info. But anyway, there are likely other instances of that same string >> *with* %m ... > Probably not, because of the way the message is worded. But we could do this: > diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c > index 6fa75d1..bed8478 100644 > --- a/src/backend/storage/file/fd.c > +++ b/src/backend/storage/file/fd.c > @@ -2461,7 +2461,7 @@ pre_sync_fname(char *fname, bool isdir) > if (fd < 0) > ereport(FATAL, > - (errmsg("could not open file \"%s\" > before fsync", > + (errmsg("could not open file \"%s\": %m", > fname))); > pg_flush_data(fd, 0, 0); > Does that sound good? Works for me. The file/line info for the message would provide the "before fsync" context anyway, if someone needed it. regards, tom lane -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers