Re: Corner-case bug in pg_rewind

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com>, Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru>
Cc: Ian Lawrence Barwick <barwick(at)gmail(dot)com>, Ian Barwick <ian(dot)barwick(at)2ndquadrant(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Corner-case bug in pg_rewind
Date: 2020-12-02 11:13:38
Message-ID: f4a0b4d4-b6bb-a6a7-45c6-15b7f8ab121c@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 01/12/2020 16:52, Pavel Borisov wrote:
> Status update for a commitfest entry.
>
> The patch is Waiting on Author for some time. As this is a bug fix,
> I am
> moving it to the next CF.
> Ian, are you planning to continue working on it?
>
> As a reviewer, I consider the patch useful and good overall. The
> comments I left were purely cosmetic. It's a pity to me that this bugfix
> delayed for such a small reason and outdated, therefore. It would be
> nice to complete this fix on the next CF.

Yeah, we really should fix this..

On 16/11/2020 04:49, Ian Lawrence Barwick wrote:
>> Also, I think Heikki's notion could be fulfilled.
>
> I spent a bit of time looking at that suggestion but couldn't actually
> verify it was an issue which needed fixing.

Attached are two patches. The first patch is your original patch,
unmodified (except for a cosmetic rename of the test file). The second
patch builds on that, demonstrating and fixing the issue I mentioned. It
took me a while to create a repro for it, it's easily masked by
incidental full-page writes or because rows created by XIDs that are not
marked as committed on the other timeline are invisible, but succeeded
at last.

- Heikki

Attachment Content-Type Size
v2-0001-pg_rewind-catch-corner-case-situation.patch text/x-patch 4.7 KB
v2-0002-Correctly-scan-all-WAL-in-target-if-it-was-shut-d.patch text/x-patch 10.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2020-12-02 11:23:57 Re: [HACKERS] logical decoding of two-phase transactions
Previous Message Andrey V. Lepikhov 2020-12-02 10:49:46 Re: Cost overestimation of foreign JOIN