Re: [INTERFACES] firewall crashes backend - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: [INTERFACES] firewall crashes backend
Date
Msg-id 1301.936828585@sss.pgh.pa.us
Whole thread Raw
In response to firewall crashes backend  ("Ken J. Wright" <ken@ori-ind.com>)
Responses Re: [INTERFACES] firewall crashes backend
List pgsql-interfaces
"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


pgsql-interfaces by date:

Previous
From: "Ken J. Wright"
Date:
Subject: firewall crashes backend
Next
From: Tom Lane
Date:
Subject: Re: [INTERFACES] Internal errors when creating views ...