Re: initdb and fsync
От | Peter Eisentraut |
---|---|
Тема | Re: initdb and fsync |
Дата | |
Msg-id | 1339584783.11971.28.camel@vanquo.pezone.net обсуждение исходный текст |
Ответ на | Re: initdb and fsync (Jeff Davis <pgsql@j-davis.com>) |
Ответы |
Re: initdb and fsync
|
Список | pgsql-hackers |
On tis, 2012-06-12 at 21:09 -0700, Jeff Davis wrote: > On Sun, 2012-03-25 at 19:59 -0700, Jeff Davis wrote: > > On Sat, 2012-03-17 at 17:48 +0100, Cédric Villemain wrote: > > > I agree with Andres. > > > > > > > > > I believe we should use sync_file_range (_before?) with linux. > > > > > > And we can use posix_fadvise_dontneed on other kernels. > > > > > OK, updated patch attached. sync_file_range() is preferred, > > posix_fadvise() is a fallback. > > > > Rebased patch attached. No other changes. The --help output for the -N option was copy-and-pasted wrongly. The message issued when using -N is also a bit content-free. Maybe something like "Running in nosync mode. The data directory might become corrupt if the operating system crashes.\n" Which leads to the question, how does one get out of this state? Is running sync(1) enough? Is starting the postgres server enough? There are no updates to the initdb man page included in your patch, which would be a suitable place to discuss this briefly.
В списке pgsql-hackers по дате отправления: