Stephan Szabo wrote:
> Explain output would also be useful. I would wonder if it's a problem
> with a hash that misestimated the necessary size; you might see if
> analyzing the tables involved changes its behavior.
I executed ANALYZE just before running the problematic statement. Will
post the output of EXPLAIN, if no other explanation comes up.