WAL contains references to invalid pages in hot standby

From: Andrus <kobruleht2(at)hot(dot)ee>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: WAL contains references to invalid pages in hot standby
Date: 2022-11-26 16:06:05
Message-ID: fb553fae-2cb9-9daa-139c-b306afd76d86@hot.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi!

WAL playback in hot standby server crashes  with "WAL contains
references to invalid pages" error :

2022-11-26 17:48:12.889 EET [497] LOG:  restored log file
"000000010000057900000064" from archive
2022-11-26 17:48:20.897 EET [497] LOG:  restored log file
"000000010000057900000065" from archive
2022-11-26 17:48:26.564 EET [497] LOG:  restored log file
"000000010000057900000066" from archive
2022-11-26 17:48:32.019 EET [497] LOG:  consistent recovery state
reached at 579/66954858
2022-11-26 17:48:32.019 EET [495] LOG:  database system is ready to
accept read only connections
2022-11-26 17:48:32.019 EET [497] WARNING:  page 11 of relation
base/54455050/83221012 is uninitialized
2022-11-26 17:48:32.019 EET [497] CONTEXT:  WAL redo at 579/66967DB0 for
Heap2/VISIBLE: cutoff xid 167913422 flags 0x01
2022-11-26 17:48:32.019 EET [497] PANIC:  WAL contains references to
invalid pages
2022-11-26 17:48:32.019 EET [497] CONTEXT:  WAL redo at 579/66967DB0 for
Heap2/VISIBLE: cutoff xid 167913422 flags 0x01
2022-11-26 17:48:34.315 EET [495] LOG:  startup process (PID 497) was
terminated by signal 6: Aborted
2022-11-26 17:48:34.315 EET [495] LOG:  terminating any other active
server processes
2022-11-26 17:48:34.330 EET [495] LOG:  database system is shut down

It looks like file 000000010000057900000067 is corrupted. I looked into
this file and it contains data like other WAL files.

How to fix this error so that Wal playback can continue?

Master server is in Postgres 12 in Debian 10.3

Hot standby in Postgres 12 in WSL Debian 11.5

Can Debian version 10.3/11.5 difference cause this exception?

Andrus.

Browse pgsql-general by date

  From Date Subject
Next Message William Torrez Corea 2022-11-26 22:43:23 collect2: error: ld returned 1 exit status
Previous Message Pierre Forstmann 2022-11-26 09:14:03 Re: system variable can be edited by all user?