Re: BRIN indexes - TRAP: BadArgument
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>,
Heikki Linnakangas <hlinnakangas@vmware.com>,
Erik Rijkers <er@xs4all.nl>, Emanuel Calvo <3manuek@esdebian.org>,
Simon Riggs <simon@2ndquadrant.com>,
Nicolas Barbier <nicolas.barbier@gmail.com>,
Claudio Freire <klaussfreire@gmail.com>, Josh Berkus <josh@agliodbs.com>,
Andres Freund <andres@2ndquadrant.com>,
Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2014-11-06T21:54:14Z
Lists: pgsql-hackers
Attachments
- brin-24.patch.gz (application/gzip) patch
Jeff Janes wrote: > On Wed, Nov 5, 2014 at 12:54 PM, Alvaro Herrera <alvherre@2ndquadrant.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 http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Commits
-
Refactor per-page logic common to all redo routines to a new function.
- f8f4227976a2 9.5.0 cited
-
Reduce use of heavyweight locking inside hash AM.
- 76837c1507cb 9.3.0 cited
-
Scan the buffer pool just once, not once per fork, during relation drop.
- ece01aae4792 9.2.0 cited
-
Major patch from Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
- 9e2a87b62db8 7.1.1 cited