From: David Steele <david@pgmasters.net>
To: Владимир Владимир <skilyazhnev@mail.ru>
To: michael@paquier.xyz
Cc: pgsql-bugs@lists.postgresql.org
Cc: antkurochkin@gmail.com
Subject: Re: BUG #16894: PANIC: WAL contains references to invalid pages
Date: Sat, 6 Mar 2021 09:37:30 -0500
Message-ID: <4f2fbc28-8a4b-9126-aac7-da8a638329f1@pgmasters.net> (raw)
In-Reply-To: <1615015953.849822391@f335.i.mail.ru>
References: <16894-c29735df12727642@postgresql.org>
<fcabffa9-2eb3-0153-c8bc-40516e483338@pgmasters.net>
<23573146-ad8e-f78b-758b-27c5772cf55f@gmail.com>
<1615015953.849822391@f335.i.mail.ru>
On 3/6/21 2:32 AM, Владимир Владимир wrote:
>
> I have reproduced the situation with WAL files and zeroed pgbackrest files.
> the same problem started on the first lsn in wal.
I spent some time looking through the code this morning. As I read it,
WAL replay allows uninitialized (and missing) pages up to the point
where consistency is achieved and after that flags uninitialized (or
missing) pages as errors. It's pretty hard to argue with this logic and
it addresses my concern about torn pages in the backups, i.e.
torn/zero/missing pages will be repaired without complaint up to
consistency.
So I believe that means Postgres is working as expected and there is no bug.
For pgBackRest selective restore there are two solutions:
1) It appears recovery_target = 'immediate' works fine. This was
verified in Anton's case. Vladimir, perhaps you could try that?
2) PG13 introduced the ignore_invalid_pages GUC [1] which should allow
replay to work past consistency. Note that the onus would be on the user
to ensure that there were no invalid pages in the database(s) they are
restoring.
I think we should continue the discussion in [2] since there doesn't
seem to be anything else to discuss in this thread.
Regards,
--
-David
david@pgmasters.net
[1]
https://www.postgresql.org/message-id/E1iu6D8-0000tK-Cm%40gemulon.postgresql.org
[2] https://github.com/pgbackrest/pgbackrest/issues/796
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: david@pgmasters.net, skilyazhnev@mail.ru, michael@paquier.xyz, pgsql-bugs@lists.postgresql.org, antkurochkin@gmail.com
Subject: Re: BUG #16894: PANIC: WAL contains references to invalid pages
In-Reply-To: <4f2fbc28-8a4b-9126-aac7-da8a638329f1@pgmasters.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox