RE: Should walsernder check correctness of WAL records?

From: "tsunakawa(dot)takay(at)fujitsu(dot)com" <tsunakawa(dot)takay(at)fujitsu(dot)com>
To: 'Konstantin Knizhnik' <k(dot)knizhnik(at)postgrespro(dot)ru>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: RE: Should walsernder check correctness of WAL records?
Date: 2020-10-02 00:16:25
Message-ID: TYAPR01MB299024C7E5DB0B965A5C5677FE310@TYAPR01MB2990.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

From: Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>
> Investigating one of customer's support cases I found out that walsender
> is not calculating WAL records CRC and send them to replicas without any
> checks.
> As a result damaged WAL record causes errors on all replicas:

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.

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.

Regards
Takayuki Tsunakawa

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2020-10-02 00:28:53 Re: Should walsernder check correctness of WAL records?
Previous Message Etsuro Fujita 2020-10-02 00:00:53 Re: Asynchronous Append on postgres_fdw nodes.