Re: BRIN indexes - TRAP: BadArgument

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Erik Rijkers <er(at)xs4all(dot)nl>, Emanuel Calvo <3manuek(at)esdebian(dot)org>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Nicolas Barbier <nicolas(dot)barbier(at)gmail(dot)com>, Claudio Freire <klaussfreire(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: BRIN indexes - TRAP: BadArgument
Date: 2014-11-10 21:15:52
Message-ID: 20141110211552.GI1791@alvin.alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera wrote:

> Hm, I think I see what's happening. The xl_brin_update record
> references two buffers, one which is target for the updated tuple and
> another which is the revmap buffer. When the update target buffer is
> being first used we set the INIT bit which removes the buffer reference
> from the xlog record; in that case, if the revmap buffer is first being
> modified after the prior checkpoint, that revmap buffer receives backup
> block number 0; but the code hardcodes it as 1 on the expectation that
> the buffer that's target for the update will receive 0. The attached
> patch should fix this.

Pushed, thanks for the report.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2014-11-10 21:26:03 Re: BRIN indexes - TRAP: BadArgument
Previous Message Stephen Frost 2014-11-10 20:53:31 Re: pg_background (and more parallelism infrastructure patches)