pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: pgsql-committers <pgsql-committers@postgresql.org>
Subject: Re: pgsql: Recursively fsync() the data directory after a crash.
Date: Mon, 18 May 2015 12:51:14 -0400
Message-ID: <21963.1431967874@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoZLvn4O7BJuB5OJEHYNx1pwkLZncFs+kws_PDoYnJpm0w@mail.gmail.com>
References: <E1YpL1A-0007Tz-Av@gemulon.postgresql.org>
	<555943FB.8090703@gmx.net>
	<CA+TgmobK=p4wnikYaSRgz6S3WhqDdFhpBv1Vmysz0cBQskoq=w@mail.gmail.com>
	<14375.1431961473@sss.pgh.pa.us>
	<CA+TgmobjLyAGC_e6MHn_mNfBVibE7JKYQtE22AS8pLwfsMDoQA@mail.gmail.com>
	<20913.1431965703@sss.pgh.pa.us>
	<20150518162201.GF9458@momjian.us>
	<21592.1431967153@sss.pgh.pa.us>
	<CA+TgmoZLvn4O7BJuB5OJEHYNx1pwkLZncFs+kws_PDoYnJpm0w@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Robert Haas <robertmhaas@gmail.com> writes:
> On Mon, May 18, 2015 at 12:39 PM, Tom Lane <tgl@sss.pgh.pa.us> 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



view thread (19+ messages)  latest in thread

Message-ID: <21963.1431967874@sss.pgh.pa.us>
Permalink:  ../21963.1431967874@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/21963.1431967874@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, bruce@momjian.us
  Subject: Re: pgsql: Recursively fsync() the data directory after a crash.
  In-Reply-To: <21963.1431967874@sss.pgh.pa.us>
  References: <E1YpL1A-0007Tz-Av@gemulon.postgresql.org> <555943FB.8090703@gmx.net> <CA+TgmobK=p4wnikYaSRgz6S3WhqDdFhpBv1Vmysz0cBQskoq=w@mail.gmail.com> <14375.1431961473@sss.pgh.pa.us> <CA+TgmobjLyAGC_e6MHn_mNfBVibE7JKYQtE22AS8pLwfsMDoQA@mail.gmail.com> <20913.1431965703@sss.pgh.pa.us> <20150518162201.GF9458@momjian.us> <21592.1431967153@sss.pgh.pa.us> <CA+TgmoZLvn4O7BJuB5OJEHYNx1pwkLZncFs+kws_PDoYnJpm0w@mail.gmail.com> <21963.1431967874@sss.pgh.pa.us>

* 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