"Ken J. Wright" <ken@ori-ind.com> writes:
> When connecting to postgresql 6.5.1 through a socks5 firewall via ODBC, the
> following error occurs:
> ERROR: postmaster: StreamConnection: accept: No route to host
> Then the backend crashes.
I think you mean the postmaster crashes?
> Although the firewall is probably causing the routing trouble, it seems a
> bit extreme for the backend to crash!
I agree. This looks like a context problem: the StreamConnection
routine is calling elog() to report the error --- but elog expects
to be inside a running backend, not the postmaster process. Trying
to send to the client is no good, and trying to longjmp back to the
backend execution loop is even less good :-(
StreamConnection should probably just use perror to report the error
on stderr. There's no hope of telling the client about it...
regards, tom lane