Re: Should walsernder check correctness of WAL records?

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Should walsernder check correctness of WAL records?
Дата
Msg-id 20201002002853.GB1464@paquier.xyz
обсуждение исходный текст
Ответ на RE: Should walsernder check correctness of WAL records?  ("tsunakawa.takay@fujitsu.com" <tsunakawa.takay@fujitsu.com>)
Ответы RE: Should walsernder check correctness of WAL records?  ("tsunakawa.takay@fujitsu.com" <tsunakawa.takay@fujitsu.com>)
Re: Should walsernder check correctness of WAL records?  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
Список pgsql-hackers
On Fri, Oct 02, 2020 at 12:16:25AM +0000, tsunakawa.takay@fujitsu.com wrote:
> IIUC, walsender tries hard to send WAL as fast as possible to reduce
> replication lag and transaction response time, so it doesn't try to
> peek each WAL record.  I think it's good.

CRC calculation would unlikely be the bottleneck here, no?  I would
assume that the extra lseek() calls needed to look after the record
data to be more harmful.

> In any case, the WAL can get corrupt during transmission, and
> writing and reading on the standby.  So, the standby needs to check
> the WAL record CRC.

Yep.  However, I would worry much more about the case of cold
archives.  In my experience, there are higher risks to get a WAL
segment corrupted because it was on disk and that this disk got
corrupted.  Transmission is a one-time short operation. Cold archives
could stay on disk for weeks before getting reused in WAL replay.
--
Michael

Вложения

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

Предыдущее
От: "tsunakawa.takay@fujitsu.com"
Дата:
Сообщение: RE: Should walsernder check correctness of WAL records?
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: New statistics for tuning WAL buffer size