Re: BRIN indexes - TRAP: BadArgument

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: 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-06 21:54:14
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Jeff Janes wrote:
> On Wed, Nov 5, 2014 at 12:54 PM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
> wrote:
> Thanks for the updated patch.
> Now when I run the test program (version with better error reporting
> attached), it runs fine until I open a psql session and issue:
> reindex table foo;

Interesting. This was a more general issue actually -- if you dropped
the index at that point and created it again, the resulting index would
also be corrupt in the same way. Inspecting with the supplied
pageinspect functions made the situation pretty obvious. The old code
was skipping page ranges in which it could not find any tuples, but
that's bogus and inefficient. I changed an "if" into a loop that
inserts intermediary tuples, if any are needed. I cannot reproduce that
problem anymore.

Álvaro Herrera
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
brin-24.patch.gz application/gzip 56.0 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2014-11-06 22:03:28 Re: group locking: incomplete patch, just for discussion
Previous Message Jim Nasby 2014-11-06 21:37:01 Re: [BUGS] ltree::text not immutable?