Pawel Kudzia <kudzia@gmail.com> writes:
> with help from IRC we've found that decreasing work_mem from 1MB to 256kB
> or less makes the problem go away:
Hmm. So that suggests that the index itself is *not* corrupt,
but the problem is associated with a bug in the indexscan
algorithms.
Have you experimented with different index opclasses? Your
original report said you were using gin__int_ops, but that's
not the default, and we sort of deprecate intarray these days.
regards, tom lane