Re: BRIN index bug due to WAL refactoring

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: BRIN index bug due to WAL refactoring
Date: 2015-06-26 19:39:46
Message-ID: CAMkU=1ww+4nctAfahYBOfQJLEUaSTHQL-UqqCiQ257aatoWf-A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 26, 2015 at 11:35 AM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2015-06-26 19:47:30 Re: checkpointer continuous flushing
Previous Message Andres Freund 2015-06-26 19:39:26 Re: Removing SSL renegotiation (Was: Should we back-patch SSL renegotiation fixes?)