Re: POSIX file updates

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: POSIX file updates
Дата
Msg-id 20606.1207026437@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: POSIX file updates  (Greg Smith <gsmith@gregsmith.com>)
Список pgsql-performance
Greg Smith <gsmith@gregsmith.com> writes:
> Quoting from Lewine's "POSIX Programmer's Guide":

> "After a write() to a regular file has successfully returned, any
> successful read() from each byte position in the file that was modified by
> that write() will return the data that was written by the write()...a
> similar requirement applies to multiple write operations to the same file
> position"

Yeah, I imagine this is what the OP is thinking of.  But note that what
it describes is the behavior of concurrent write() and read() calls
within a normally-functioning system.  I see nothing there that
constrains the order in which writes hit physical disk, nor (to put it
another way) that promises anything much about the state of the
filesystem after a crash.

As you stated, PG is largely independent of these issues anyway.  As
long as the filesystem honors its spec-required contract that it won't
claim fsync() is complete before all the referenced data is safely on
persistent store, we are OK.

            regards, tom lane

В списке pgsql-performance по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Performance Implications of Using Exceptions
Следующее
От: Cédric Villemain
Дата:
Сообщение: Re: Bad prepare performance