From: | David Steele <david(at)pgmasters(dot)net> |
---|---|
To: | Владимир Владимир <skilyazhnev(at)mail(dot)ru>, michael(at)paquier(dot)xyz |
Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org, antkurochkin(at)gmail(dot)com |
Subject: | Re: BUG #16894: PANIC: WAL contains references to invalid pages |
Date: | 2021-03-06 14:37:30 |
Message-ID: | 4f2fbc28-8a4b-9126-aac7-da8a638329f1@pgmasters.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
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(at)pgmasters(dot)net
[1]
https://www.postgresql.org/message-id/E1iu6D8-0000tK-Cm%40gemulon.postgresql.org
[2] https://github.com/pgbackrest/pgbackrest/issues/796
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2021-03-06 20:01:43 | Re: pg_upgrade test for binary compatibility of core data types |
Previous Message | Владимир Владимир | 2021-03-06 07:32:33 | Re[2]: BUG #16894: PANIC: WAL contains references to invalid pages |