From: Dennis Jacobfeuerborn <dennisml@conversis.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: "invalid record length" after restoring pg_basebackup
Date: Mon, 16 Nov 2020 11:39:41 +0100
Message-ID: <5a773ed9-9555-902e-f240-8720d64310ca@conversis.de> (raw)
In-Reply-To: <285451.1605279777@sss.pgh.pa.us>
References: <c729cdd1-73c3-73f8-9f40-dd0fc84efb29@conversis.de>
<285451.1605279777@sss.pgh.pa.us>
On 11/13/20 4:02 PM, Tom Lane wrote:
> Dennis Jacobfeuerborn <dennisml@conversis.de> writes:
>> All of this works fine and the logs report that the db reaches a
>> consistent recovery state but as last entry it reports an "invalid
>> record length":
>
> This looks quite normal to me. If you'd pulled the power plug on the
> primary system at the time you made this backup, you would likely see
> the same message at the end of its crash recovery. Some sort of
> corrupt-WAL-entry report is expected at the end of WAL replay anytime
> you didn't have a clean shutdown.
But the system the backup was pulled from kept running fine. Also
wouldn't that make re-attaching the system to the primary impossible
since replication cannot be continued due to the broken WAL record?
What I would expect is that pg_basebackup only transfer healthy WAL
entries so that a restored system can pick up right after that with
streaming replication.
Regards,
Dennis
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: dennisml@conversis.de, tgl@sss.pgh.pa.us
Subject: Re: "invalid record length" after restoring pg_basebackup
In-Reply-To: <5a773ed9-9555-902e-f240-8720d64310ca@conversis.de>
References: <c729cdd1-73c3-73f8-9f40-dd0fc84efb29@conversis.de> <285451.1605279777@sss.pgh.pa.us> <5a773ed9-9555-902e-f240-8720d64310ca@conversis.de>
* 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