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

From Tom Lane
Subject Re: Invalid length of startup packet
Date
Msg-id 3116.1022597938@sss.pgh.pa.us
Whole thread Raw
In response to Re: Invalid length of startup packet  ("Nigel J. Andrews" <nandrews@investsystems.co.uk>)
List pgsql-general
"Nigel J. Andrews" <nandrews@investsystems.co.uk> writes:
> Obviously, that's not entirely usable if connections are being made
> and dropped by applications. So how about elog() sticking the backend
> slot number into all messages? Is that sort of information available
> in elog?

No; in fact there is no backend slot number assigned yet during startup
processing.  But elog already can record the process PID, and that's
probably what you'd want to use to correlate these messages.  I'm
envisioning log entries like

timestamp [PID] LOG: received connection from foo.bar port 12345
timestamp [PID] FATAL: Invalid length of startup packet

The PID in the first of these messages would already be the PID of the
forked-off child, so there would be a clear correlation to the following
failure message, even if other connection requests were being processed
at about the same time.

            regards, tom lane

pgsql-general by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: [HACKERS] Re : Solaris Performance - 64 bit puzzle
Next
From: Chris Humphries
Date:
Subject: triggers cant see functions