From: David Steele <david@pgmasters.net>
To: Michael Paquier <michael@paquier.xyz>
Cc: Антон Курочкин <antkurochkin@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16894: PANIC: WAL contains references to invalid pages
Date: Fri, 5 Mar 2021 07:55:43 -0500
Message-ID: <fcabffa9-2eb3-0153-c8bc-40516e483338@pgmasters.net> (raw)
In-Reply-To: <YEG0bx9RAvbq/RTF@paquier.xyz>
References: <16894-c29735df12727642@postgresql.org>
<CABPPpF3mym72xDOyvvfBb4e-rV1Z2Qdip7qQSf2axdnuj-sv=Q@mail.gmail.com>
<fd63fe44-7858-5b0a-1709-b9a2da11e36c@pgmasters.net>
<YDxuCMyEeLofajLi@paquier.xyz>
<11b70b37-997e-8a2d-62f3-0f8398b7cafd@pgmasters.net>
<YD802EbDVvs4SWo0@paquier.xyz>
<188742f3-a8d0-20b1-2acb-a038a7d5727b@pgmasters.net>
<YEG0bx9RAvbq/RTF@paquier.xyz>
On 3/4/21 11:32 PM, Michael Paquier wrote:
> On Wed, Mar 03, 2021 at 06:49:02AM -0500, David Steele wrote:
>> OK, but shouldn't we have a full page write for this page after the backup
>> starts, rather than the partial we seem to be seeing here? Is there any
>> condition where the full page write would be skipped legitimately, or does
>> it point to a problem?
>
> That's how things work. If they don't work this way for physical
> backups, we may have a problem. At replay, the full page will be
> replayed if BKPIMAGE_APPLY is correctly set, as per
> XLogReadBufferForRedoExtended(). And XLogRecordAssemble()
> does the decision when building the record (just grep for
> needs_backup).
That's exactly the problem. This WAL record appears to be the only
reference to the page the submitter could find in their WAL. Anton,
could you confirm that?
If we can confirm that there is no FPI for this page after the initial
backup checkpoint, wouldn't that point to an issue?
>> If Postgres is running correctly there is certainly no expectation for
>> support of this unusual use case, but I do think that this possibly points
>> to an issue in Postgres, which under normal circumstances would be very hard
>> to detect.
>
> Well, the report tells that this is an issue that happens on those
> fake files full of zeros, but are you sure that you have the sizing
> right? I still don't see any evidence of anything broken based on the
> information gathered for full backups, FWIW.
This is the size we validate for normal restores so pretty sure it is
accurate. Actually, postgres doesn't seem to care if the file is large
enough as long as it is present. The reason we precreate the files at
the correct size is because when postgres extends the file it is not
sparse and uses more space.
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, michael@paquier.xyz, antkurochkin@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16894: PANIC: WAL contains references to invalid pages
In-Reply-To: <fcabffa9-2eb3-0153-c8bc-40516e483338@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