Re: pg_rewind is not crash safe

From: "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_rewind is not crash safe
Date: 2020-08-06 04:55:51
Message-ID: 8604C380-E070-4853-A6FA-D20AFA0B918B@yandex-team.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 5 авг. 2020 г., в 23:13, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> написал(а):
>
> A colleague of mine brought to my attention that pg_rewind is not crash safe. If it is interrupted for any reason, it leaves behind a data directory with a mix of data from the source and target images. If you're "lucky", the server will start up, but it can be in an inconsistent state.

FWIW we routinely encounter cases when after unsuccessful pg_rewind databases refuses to start with "contrecord requested" message.
I did not investigate this in detail yet, but I think it is a result of wrong redo recptr written to control file (due to interruption or insufficient present WAL segments).

Best regards, Andrey Borodin.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2020-08-06 05:00:02 Re: public schema default ACL
Previous Message Andrey M. Borodin 2020-08-06 04:50:40 Re: Amcheck: do rightlink verification with lock coupling