Re: Magnus Hagander 2016-04-13 
<cabuevezq8_nsq7fwe0-fboak8s2ynn-pkfsamfevy2-d3dr...@mail.gmail.com>
> > >>> It's fairly common to see a lot of "Incomplete startup packet" in the
> > >>> logfiles caused by monitoring or healthcheck connections.
> >
> > >> I've also seen it caused by port scanning.
> >
> > > Yes, definitely. Question there might be if that's actually a case when
> > we
> > > *want* that logging?
> >
> > I should think someone might.  But I doubt we want to introduce another
> > GUC for this.  Would it be okay to downgrade the message to DEBUG1 if
> > zero bytes were received?
> >
> >
> Yeah, that was my suggestion - I think that's a reasonable compromise.  And
> yes, I agree that a separate GUC for it would be a huge overkill.

There have been numerous complaints about that log message, and the
usual reply is always something like what Pavel said recently:

"It is garbage. Usually it means nothing, but better to work live
without this garbage." [1]

[1] 
https://www.postgresql.org/message-id/CAFj8pRDtwsxj63%3DLaWSwA8u7NrU9k9%2BdJtz2gB_0f4SxCM1sQA%40mail.gmail.com

Let's get rid of it.

Christoph
>From 19b4e489fdc974ad8414e960a721694b2c2ee9d5 Mon Sep 17 00:00:00 2001
From: Christoph Berg <christoph.b...@credativ.de>
Date: Thu, 28 Feb 2019 16:12:46 +0100
Subject: [PATCH] Demote "incomplete startup packet" to DEBUG1

---
 src/backend/postmaster/postmaster.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index ccea231e98..2dfb7b6e0a 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -1907,7 +1907,7 @@ ProcessStartupPacket(Port *port, bool SSLdone)
 		 * don't clutter the log with a complaint.
 		 */
 		if (!SSLdone)
-			ereport(COMMERROR,
+			ereport(DEBUG1,
 					(errcode(ERRCODE_PROTOCOL_VIOLATION),
 					 errmsg("incomplete startup packet")));
 		return STATUS_ERROR;
@@ -1919,7 +1919,7 @@ ProcessStartupPacket(Port *port, bool SSLdone)
 	if (len < (int32) sizeof(ProtocolVersion) ||
 		len > MAX_STARTUP_PACKET_LENGTH)
 	{
-		ereport(COMMERROR,
+		ereport(DEBUG1,
 				(errcode(ERRCODE_PROTOCOL_VIOLATION),
 				 errmsg("invalid length of startup packet")));
 		return STATUS_ERROR;
@@ -1938,7 +1938,7 @@ ProcessStartupPacket(Port *port, bool SSLdone)
 
 	if (pq_getbytes(buf, len) == EOF)
 	{
-		ereport(COMMERROR,
+		ereport(DEBUG1,
 				(errcode(ERRCODE_PROTOCOL_VIOLATION),
 				 errmsg("incomplete startup packet")));
 		return STATUS_ERROR;
-- 
2.20.1

Reply via email to