Subject: FATAL: could not send data to WAL stream: lost synchronization with server: got message type "0", length 892351284

From: Дмитрий <[email-masked]>
Date: Sat, 25 Jan 2025 17:58:30 +0300

Hello everyone!
Please help me with the error: FATAL: could not send data to WAL stream: lost synchronization with server: got message type "0", length 892351284.
Replication worked for more than a month and now there is such a problem. Restarting PostgreSQL helps.
How can I fix this error?
Source:
PostgreSQL 15.6 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit
CentOS Linux release 7.8.2003 (Core)
Filesystem type ext4
Receiver:
PostgreSQL 15.10 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-2), 64-bit
Red Hat Enterprise Linux release 9.5 (Plow)
Filesystem type xfs

Thank you.

---

From: Adrian Klaver <[email-masked]>
Date: Sat, 25 Jan 2025 08:31:45 -0800

On 1/25/25 06:58, Дмитрий wrote:
> Hello everyone!
> 
> Please help me with the error: FATAL: could not send data to WAL stream: 
> lost synchronization with server: got message type "0", length 892351284.

This is going to need more information:

1) What sort of replication?

2) Where are the two servers located relative to each other?

3) Has there been any software upgrades/network changes recently?

-- 
Adrian Klaver
[email-masked]