Re: fallocate / posix_fallocate for new WAL file creation (etc...)
В списке pgsql-hackers по дате отправления:
| От | Stephen Frost |
|---|---|
| Тема | Re: fallocate / posix_fallocate for new WAL file creation (etc...) |
| Дата | |
| Msg-id | 20130530131539.GS6434@tamriel.snowman.net обсуждение |
| Ответ на | Re: fallocate / posix_fallocate for new WAL file creation (etc...) (Andres Freund <andres@2ndquadrant.com>) |
| Список | pgsql-hackers |
* Andres Freund (andres@2ndquadrant.com) wrote:
> After a bit of standard perusing writing a single byte to the end of the
> file after the fallocate ought to make at least the reading guaranteed
> to be defined. If we did seek(last_byte); write(); posix_fallocate() we
> should even always have defined content. Yuck.
Alright, but would that actually be any better than just doing what
glibc's posix_fallocate() does in the generic case? And, to be honest,
it makes me a bit nervous to seek/write like that because it looks like
the typical "create a hole" setup, which we certainly aren't intending,
yet if the posix_fallocate() call disappeared, or did nothing, or this
code was copied w/o it, or someone didn't understand what it did, we
could end up with that.
Not a fan. :(
Thanks,
Stephen
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера