Re: Amcheck: do rightlink verification with lock coupling

From: "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Amcheck: do rightlink verification with lock coupling
Date: 2020-08-07 05:59:26
Message-ID: 230495AF-54F2-4DDC-9C94-F6BF9BE79C65@yandex-team.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 6 авг. 2020 г., в 21:38, Peter Geoghegan <pg(at)bowt(dot)ie> написал(а):
>
> On Wed, Aug 5, 2020 at 9:50 PM Andrey M. Borodin <x4mmm(at)yandex-team(dot)ru> wrote:
>> Sounds great! Thanks!
>
> I'm afraid that there is another problem, this time with
> btree_xlog_split(). It's possible to get false positives when running
> the new test continually on a standby. You can see this by running
> verification on a standby continually, while the primary runs with a
> workload that gets many page splits.
Yes, I see the problem...
>
> The only thing that we can do is adjust the locking in
> btree_xlog_split() to match the primary (kind of like commit 9a9db08a,
> except with page splits instead of page deletion). Attached is a
> revised version of the patch, along with the changes that we'd need to
> REDO to make the amcheck patch really work.
>
> I'm not sure if this change to the REDO routine is worth the overhead
> or trouble, though. I have to think about it some more.
If we want to check relations between pages we must either apply them together (under locks) or tolerate some fraction of false positives. I understand that mitigating and tolerating false positives is nonsense in mathematica sense, but from practical point of view it's just OK.

But having complete solution with no false positives seems much better.

>
> BTW, the first patch in the series now has a new check for page
> deletion -- that was missing from v4.
Yes, seems like that was a bug..

Thanks!

Best regards, Andrey Borodin.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Asim Praveen 2020-08-07 06:02:58 Re: [PATCH] - Provide robust alternatives for replace_string
Previous Message Etsuro Fujita 2020-08-07 05:55:40 Re: Yet another issue with step generation in partition pruning