From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Anastasia Lubennikova <a.lubennikova@postgrespro.ru>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: [BUG] Error in BRIN summarization
Date: Wed, 12 Aug 2020 14:02:18 -0400
Message-ID: <20200812180218.GA30467@alvherre.pgsql> (raw)
In-Reply-To: <20200811234321.GA17597@alvherre.pgsql>
On 2020-Aug-11, Alvaro Herrera wrote:
> A much more troubling thought is what happens if the range is
> desummarized, then the index item is used for the summary of a different
> range. Then the index might end up returning corrupt results.
Actually, this is not a concern because the brin tuple's bt_blkno is
rechecked before returning it, and if it doesn't match what we're
searching, the loop is restarted. It becomes an infinite loop problem
if the revmap is pointing to a tuple that's labelled with a different
range's blkno. So I think my patch as posted is a sufficient fix for
this problem.
--
Álvaro Herrera https://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: alvherre@2ndquadrant.com, a.lubennikova@postgrespro.ru, pgsql-hackers@lists.postgresql.org
Subject: Re: [BUG] Error in BRIN summarization
In-Reply-To: <20200812180218.GA30467@alvherre.pgsql>
* 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