Re: Invalid length of startup packet

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ron Snyder <snyder(at)roguewave(dot)com>
Cc: "'Henrik Steffen'" <steffen(at)city-map(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: Invalid length of startup packet
Date: 2002-05-28 14:02:18
Message-ID: 2750.1022594538@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ron Snyder <snyder(at)roguewave(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Nigel J. Andrews 2002-05-28 14:29:30 Re: Invalid length of startup packet
Previous Message Tom Lane 2002-05-28 13:29:51 Re: How to cripple a postgres server