Re: fsync failure in durable_unlink ignored in xlog.c?

Поиск
Список
Период
Сортировка
От Mark Dilger
Тема Re: fsync failure in durable_unlink ignored in xlog.c?
Дата
Msg-id CAE-h2To3MTknBoLhvTVy5QcJxwdJR2uLEhg4wTwdTBe+yHYy2g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: fsync failure in durable_unlink ignored in xlog.c?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, May 23, 2019 at 11:07 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Andres Freund <andres@anarazel.de> writes:
> > On 2019-05-23 10:46:02 -0700, Mark Dilger wrote:
> >> Is this code safe against fsync failures?  If so, can I get an explanation
> >> that I might put into a code comment patch?
>
> > What's the danger you're thinking of here? The issue with ignoring fsync
> > failures is that it could be the one signal about data corruption we get
> > for a write()/fsync() that failed - i.e. that durability cannot be
> > guaranteed. But we don't care about the file contents of those files.
>
> Hmm ... if we don't care, why are we issuing an fsync at all?

Tom's question is about as far as my logic went.  It seemed the fsync
must be important, or the author of this code wouldn't have put such
an expensive operation in that spot, and if so, then how can it be safe
to ignore whether the fsync returned an error.  Beyond that, I do not
have a specific danger in mind.

mark



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: fsync failure in durable_unlink ignored in xlog.c?
Следующее
От: Andres Freund
Дата:
Сообщение: Re: fsync failure in durable_unlink ignored in xlog.c?