I was able to reproduce the crash but not the hang. Would you see if the attached patch fixes both symptoms on your machine?
Yes, problem gone.
I discover however that what I was believing an hang was in reality just a delayed crash.
Regards Gaetano Mendola
---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match