LOG: invalid record length at : wanted 24, got 0

Поиск
Список
Период
Сортировка
От Harinath Kanchu
Тема LOG: invalid record length at : wanted 24, got 0
Дата
Msg-id 47509690-AC33-4C8D-8566-D1B9BF662B34@apple.com
обсуждение исходный текст
Ответы Re: LOG: invalid record length at : wanted 24, got 0  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Список pgsql-hackers
Hello,

We are seeing an interesting STANDBY behavior, that’s happening once in 3-4 days.

The standby suddenly disconnects from the primary, and it throws the error “LOG: invalid record length at <LSN>: wanted
24,got0”. 

And then it tries to restore the WAL file from the archive. Due to low write activity on primary, the WAL file will be
switchedand archived only after 1 hr. 

So, it stuck in a loop of switching the WAL sources from STREAM and ARCHIVE without replicating the primary.

Due to this there will be write outage as the standby is synchronous standby.

We are using “wal_sync_method” as “fsync” assuming WAL file not getting flushed correctly.

But this is happening even after making it as “fsync” instead of “fdatasync”.

Restarting the STANDBY sometimes fixes this problem, but detecting this automatically is a big problem as the postgres
standbyprocess will be still running fine, but WAL RECEIVER process is up and down continuously due to switching of WAL
sources.


How can we fix this ? Any suggestions regarding this will be appreciated.


Postgres Version: 13.6
OS: RHEL Linux


Thank you,


Best,
Harinath.


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

Предыдущее
От: Zheng Li
Дата:
Сообщение: Re: Support logical replication of global object commands
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: Time delayed LR (WAS Re: logical replication restrictions)