From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
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 14:00:38 -0300
Message-ID: <20150518170038.GQ2523@alvh.no-ip.org> (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 wrote:
> On Mon, May 18, 2015 at 12:39 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >> Uh, doesn't that change the translated strings? Is that a problem?
> >
> > 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?
+1. It's not like the extra two words of context would be of much use
anyway.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
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: alvherre@2ndquadrant.com, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, bruce@momjian.us
Subject: Re: pgsql: Recursively fsync() the data directory after a crash.
In-Reply-To: <20150518170038.GQ2523@alvh.no-ip.org>
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> <20150518170038.GQ2523@alvh.no-ip.org>
* 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