Re: "invalid record length" after restoring pg_basebackup

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: "invalid record length" after restoring pg_basebackup
Дата
Msg-id 756951.1605539021@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: "invalid record length" after restoring pg_basebackup  (Dennis Jacobfeuerborn <dennisml@conversis.de>)
Список pgsql-general
Dennis Jacobfeuerborn <dennisml@conversis.de> writes:
> On 11/13/20 4:02 PM, Tom Lane wrote:
>> 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?

There is no "broken WAL record".  There is only junk following the
primary's current WAL write point.

> 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.

You need to adjust your expectations.  pg_basebackup doesn't parse the WAL
data, because it has no need to.  It just copies whole WAL segment files.

            regards, tom lane



В списке pgsql-general по дате отправления:

Предыдущее
От: Condor
Дата:
Сообщение: Re: Unable to compile postgres 13.1 on Slackware current x64
Следующее
От: Laurenz Albe
Дата:
Сообщение: Re: Unable to compile postgres 13.1 on Slackware current x64