From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-committers <pgsql-committers(at)postgresql(dot)org> |
Subject: | Re: pgsql: Recursively fsync() the data directory after a crash. |
Date: | 2015-05-18 16:43:40 |
Message-ID: | CA+TgmoZLvn4O7BJuB5OJEHYNx1pwkLZncFs+kws_PDoYnJpm0w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
On Mon, May 18, 2015 at 12:39 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
>> On Mon, May 18, 2015 at 12:15:03PM -0400, Tom Lane wrote:
>>> It's a trivial enough change that I wouldn't see a problem with doing it
>>> now. But if you do, please get it in by say 2PM EDT.
>
>> 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?
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2015-05-18 16:51:14 | Re: pgsql: Recursively fsync() the data directory after a crash. |
Previous Message | Tom Lane | 2015-05-18 16:39:13 | Re: pgsql: Recursively fsync() the data directory after a crash. |