Re: [BUG] Error in BRIN summarization - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: [BUG] Error in BRIN summarization
Date
Msg-id 20200812180218.GA30467@alvherre.pgsql
Whole thread Raw
In response to Re: [BUG] Error in BRIN summarization  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Parallel query hangs after a smart shutdown is issued
Next
From: Marco Atzeri
Date:
Subject: ltree_plpython failure test on Cygwin for 12.4 test