Re: pgsql: Recursively fsync() the data directory after a crash.
От | Tom Lane |
---|---|
Тема | Re: pgsql: Recursively fsync() the data directory after a crash. |
Дата | |
Msg-id | 21963.1431967874@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: pgsql: Recursively fsync() the data directory after a crash. (Robert Haas <robertmhaas@gmail.com>) |
Список | pgsql-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
В списке pgsql-committers по дате отправления: