Re: Is pg_control file crashsafe?

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Is pg_control file crashsafe?
Дата
Msg-id 20160505205035.6q7aalqxctwqrzhn@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Is pg_control file crashsafe?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 2016-05-05 00:32:29 -0400, Tom Lane wrote:
> To repeat, I'm pretty hesitant to change this logic.  While this is not
> the first report we've ever heard of loss of pg_control, I believe I could
> count those reports without running out of fingers on one hand --- and
> that's counting since the last century. It will take quite a lot of
> evidence to convince me that some other implementation will be more
> reliable.  If you just come and present a patch to use direct write, or
> rename, or anything else for that matter, I'm going to reject it out of
> hand unless you provide very strong evidence that it's going to be more
> reliable than the current code across all the systems we support.

https://lwn.net/SubscriberLink/686150/9697c313930fbe99/ :

"Jeff Moyer pointed out that sector tearing can happen on block devices
like SSDs, which is not what users expect. "
"Actually, what I said was that sector tearing doesn't usually happen on
SSDs due to the nature of the FTL. Traditional storage, however, never
guaranteed sector atomicity, but it usually does provide it."

FWIW, at the LSF/MM session Robert and I attended I talked to a Seagate
and a WD (IIRC) employee, and there answer echoed the second comment
from above. It's unlikely, but entirely possible to get torn sectors
after power outages. What's worse, if you get one it's entirely possible
that future *reads* will not just return torn contents, but an error.

Greetings,

Andres Freund



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: [sqlsmith] Failed assertion in BecomeLockGroupLeader
Следующее
От: Andreas Seltenreich
Дата:
Сообщение: Re: [sqlsmith] Failed assertion in BecomeLockGroupLeader