I recently noticed this in a customer log file:
ERROR: could not read from hash-join temporary file: Success
The problem is we're reporting with %m when the problem is a partial
read or write.
I propose the attached patch to solve it: report "wrote only X of X
bytes". This caused a lot of other trouble, the cause of which I've
been unable to pinpoint as yet. But in the meantime, this is already a
small improvement.
--
Álvaro Herrera