From: David Steele <david@pgmasters.net>
To: Антон Курочкин <antkurochkin@gmail.com>
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16894: PANIC: WAL contains references to invalid pages
Date: Thu, 25 Feb 2021 12:53:44 -0500
Message-ID: <fd63fe44-7858-5b0a-1709-b9a2da11e36c@pgmasters.net> (raw)
In-Reply-To: <CABPPpF3mym72xDOyvvfBb4e-rV1Z2Qdip7qQSf2axdnuj-sv=Q@mail.gmail.com>
References: <16894-c29735df12727642@postgresql.org>
<CABPPpF3mym72xDOyvvfBb4e-rV1Z2Qdip7qQSf2axdnuj-sv=Q@mail.gmail.com>
On 2/24/21 7:22 AM, Антон Курочкин wrote:
>
> We got error when PITR restoring individual databases from a backup
> using
> pgbackrest.
>
> Opened issue in pgbackrest repository:
> https://github.com/pgbackrest/pgbackrest/issues/796
> <https://github.com/pgbackrest/pgbackrest/issues/796;
> It would be great if you would look at this problem. All the
> information is
> in the issue.
>
> Pgbackrest developers offered to provide this information to the
> postgres
> folks.
>
> Turned out that the problem is playing WAL files on databases that are
> restored with zero files.
> The database files from the backup are restored successfully, but an
> error
> occurs when starting PG and playing WAL:
<snip>
> < 2021-02-21 10:35:09.050 UTC > WARNING: page 22659 of relation
> base/17221/17557 is uninitialized
> < 2021-02-21 10:35:09.050 UTC > CONTEXT: xlog redo at 7E/8D9C04C0 for
> Heap2/VISIBLE: cutoff xid 810424291 flags 1
> < 2021-02-21 10:35:09.050 UTC > PANIC: WAL contains references to >
invalid pages
> < 2021-02-21 10:35:09.050 UTC > CONTEXT: xlog redo at 7E/8D9C04C0 for
> Heap2/VISIBLE: cutoff xid 810424291 flags 1
For context, when a user performs selective restore all the relations
for databases *not* selected are restored as sparse zero files with the
correct size. WAL replay will update those relations but they are not
expected to be consistent, and in fact we make it impossible to logon to
those databases so the only option is to drop them.
Still, this is a fairly efficient way to get at a single database in a
cluster that contains hundreds or thousands of databases.
Clearly the methodology is a bit unorthodox, but even so we don't expect
to see an error here. This is the first time we've gotten a detailed
analysis of the issue, so I haven't had time to really look into it, but
perhaps there is a full page write missing? In the case of corruption
the administrator might zero a page and we expect WAL replay to succeed,
I think.
Regards,
--
-David
david@pgmasters.net
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, antkurochkin@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16894: PANIC: WAL contains references to invalid pages
In-Reply-To: <fd63fe44-7858-5b0a-1709-b9a2da11e36c@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