From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Andrey Borodin <x4mmm@yandex-team.ru>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Amcheck: do rightlink verification with lock coupling
Date: Sat, 11 Jan 2020 13:25:01 +0100
Message-ID: <20200111122501.rhpxt5f44jlnee5u@development> (raw)
In-Reply-To: <CAH2-WzntedoYDfGFK_TwEOVuLQHhzOuubV996dHKmWkzA101WQ@mail.gmail.com>
References: <0EB0CFA8-CBD8-4296-8049-A2C0F28FAE8C@yandex-team.ru>
<20190912131612.GA24926@alvherre.pgsql>
<20200111014538.y4u6fynjeha2nml6@development>
<CAH2-WzntedoYDfGFK_TwEOVuLQHhzOuubV996dHKmWkzA101WQ@mail.gmail.com>
On Fri, Jan 10, 2020 at 06:49:33PM -0800, Peter Geoghegan wrote:
>On Fri, Jan 10, 2020 at 5:45 PM Tomas Vondra
><tomas.vondra@2ndquadrant.com> wrote:
>> Peter, any opinion on this proposed amcheck patch? In the other thread
>> [1] you seemed to agree this is worth checking, and Alvaro's proposal to
>> make this check optional seems like a reasonable compromise with respect
>> to the locking.
>
>It's a good idea, and it probably doesn't even need to be made
>optional -- lock coupling to the right is safe on a primary, and
>should also be safe on standbys (though I should triple check the REDO
>routines to be sure). The patch only does lock coupling when it proves
>necessary, which ought to only happen when there is a concurrent page
>split, which ought to be infrequent. Maybe there is no need to
>compromise.
>
OK, that makes sense.
>I'm curious why Andrey's corruption problems were not detected by the
>cross-page amcheck test, though. We compare the first non-pivot tuple
>on the right sibling leaf page with the last one on the target page,
>towards the end of bt_target_page_check() -- isn't that almost as good
>as what you have here in practice? I probably would have added
>something like this myself earlier, if I had reason to think that
>verification would be a lot more effective that way.
>
>To be clear, I believe that Andrey wrote this patch for a reason -- I
>assume that it makes a noticeable and consistent difference. I would
>like to gain a better understanding of why that was for my own
>benefit, though. For example, it might be that page deletion was a
>factor that made the test I mentioned less effective. I care about the
>specifics.
>
Understood. Is that a reason to not commit of this patch now, though?
regards
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tomas.vondra@2ndquadrant.com, pg@bowt.ie, alvherre@2ndquadrant.com, x4mmm@yandex-team.ru
Subject: Re: Amcheck: do rightlink verification with lock coupling
In-Reply-To: <20200111122501.rhpxt5f44jlnee5u@development>
* 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