Paulo Jan <admin(at)mail(dot)ddnet(dot)es> writes:
> I have here a query that hangs everytime I try to execute it, even
> though IMO it isn't *that* complicated (nor is the database *that* big).
Very bizarre. Can you attach to the backend process with gdb and get a
backtrace to see where it's hung up?
regards, tom lane