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: "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk>, "'Henrik Steffen'" <steffen(at)city-map(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: Invalid length of startup packet
Date: 2002-05-29 00:04:05
Message-ID: 18207.1022630645@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 the output becomes something similar to this:
>> May 28 09:14:55 vault pgqv[4332]: [1] DEBUG: connection: host=172.21.41.62:3586
>> May 28 09:14:55 vault pgqv[4332]: [2] DEBUG: authorize: user=dbuser database=test

> I kinda like that approach, actually, with both messages driven off the
> LOG_CONNECTIONS flag. Does anyone really hate it?

I've committed changes to split LOG_CONNECTIONS logging into two parts.
CVS tip now produces one message as soon as a connection is received
(well, actually just after a successful fork() to handle the connection)
and another at successful conclusion of the authentication phase:

2002-05-28 19:47:42 [18108] LOG: connection received: host=127.0.0.1 port=1117
2002-05-28 19:47:42 [18108] LOG: connection authorized: user=postgres database=regression

In error cases you'd get log results like this:

2002-05-28 19:48:20 [18114] LOG: connection received: host=192.168.1.3 port=1119
2002-05-28 19:48:20 [18114] FATAL: No pg_hba.conf entry for host 192.168.1.3, user postgres, database postgres
2002-05-28 19:48:38 [18116] LOG: connection received: host=127.0.0.1 port=1120
2002-05-28 19:48:42 [18116] FATAL: invalid length of startup packet

(the last is from a manual telnet connection).

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2002-05-29 00:35:52 Re: [HACKERS] Re : Solaris Performance - 64 bit puzzle
Previous Message Stephen Robert Norris 2002-05-28 23:27:19 Re: How to cripple a postgres server