"Ilja Golshtein" <ilejn(at)yandex(dot)ru> writes:
> To be honest, I don't quite understand why PG does 'send' again and again, while
> EPIPE seems to be unrecoverable.
> Isn't it better to terminate server process?
No. See previous discussions in the archives.
(One point is that a long-running query isn't necessarily generating any
output, anyway, so this wouldn't be a magic cure for anything.)
regards, tom lane