Re: BRIN index bug due to WAL refactoring - Mailing list pgsql-hackers

From Jeff Janes
Subject Re: BRIN index bug due to WAL refactoring
Date
Msg-id CAMkU=1ww+4nctAfahYBOfQJLEUaSTHQL-UqqCiQ257aatoWf-A@mail.gmail.com
Whole thread Raw
In response to Re: BRIN index bug due to WAL refactoring  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: BRIN index bug due to WAL refactoring  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers

On Fri, Jun 26, 2015 at 11:35 AM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
Jeff Janes wrote:

> On replica:
>
> set enable_seqscan TO off;
> explain (analyze) select count(*) from foobar ;
> ERROR:  corrupted BRIN index: inconsistent range map

Nice.  As I understand it, the problem is that the replay is using the
block number of the revmap page as target blkno of the revmap entry,
when it should be using the block number of the data page.  This should
fix it.


Thanks, that worked.

The way the blkno and buffer refer to different block/buffers is pretty confusing.  Could we rename a variable to make it clearer which buffer's number is contained in blkno?

Thanks,

Jeff

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Removing SSL renegotiation (Was: Should we back-patch SSL renegotiation fixes?)
Next
From: Fabien COELHO
Date:
Subject: Re: checkpointer continuous flushing