Re: Invalid length of startup packet - Mailing list pgsql-general

From Tom Lane
Subject Re: Invalid length of startup packet
Date
Msg-id 2750.1022594538@sss.pgh.pa.us
Whole thread Raw
In response to Re: Invalid length of startup packet  (Ron Snyder <snyder@roguewave.com>)
Responses Re: Invalid length of startup packet
List pgsql-general
Ron Snyder <snyder@roguewave.com> writes:
> If we portscan our database server and include the postgres port in the list
> of scanned ports, we'll get that error in our logs.  You can also get that
> message by attempting to telnet to your postgres port.  I'm a little
> surprised that postgres doesn't list some source ip information with the
> message.

It would be fairly easy to rearrange the code in postmaster.c so that
a log message like "attempted connection from host xxx port yyy" is
emitted before we try to receive and interpret the startup packet.
But I don't think we can guarantee that every error condition that might
occur in that stretch of code could be modified to include host/port in
the text of the error message.  So the "attempted connection" message
would have to be logged unconditionally for every connection attempt.
Does that seem useful?  Would you want it to be automatic when
LOG_CONNECTIONS is on, or should it require some higher-than-normal
debug setting?

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: How to cripple a postgres server
Next
From: "Nigel J. Andrews"
Date:
Subject: Re: Invalid length of startup packet