crash in DROP INDEX CONCURRENTLY

Alvaro Herrera <alvherre@2ndquadrant.com>

From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2012-11-07T15:54:57Z
Lists: pgsql-hackers

Attachments

I just observed that if I run src/test/regress' "make
installcheck-parallel" and concurrently src/test/isolation's "make
installcheck", I very reproducibly get a segfault (in an assert-enabled
build).  Apparently the problem is that somebody is trying to transfer
predicate locks to a relation, but the index' relcache entry is pfreed.

I think the fix is just to move the heap_open calls some lines upwards, as in
the attached patch.

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