From: Matthias Apitz <guru@unixarea.de>
To: pgsql-general@lists.postgresql.org
Subject: Re: PostgreSQL client hangs sometimes on 'EXEC SQL PREPARE sid_sisisinst FROM :select_anw;'
Date: Tue, 28 Apr 2020 10:10:18 +0200
Message-ID: <20200428081018.GB4007@sh4-5.1blu.de> (raw)
In-Reply-To: <20200427131955.GB24964@sh4-5.1blu.de>
References: <20200427122123.GA11416@sh4-5.1blu.de>
<5198.1587991204@sss.pgh.pa.us>
<20200427130618.GA24964@sh4-5.1blu.de>
<20200427131955.GB24964@sh4-5.1blu.de>
I've added the proposed log line to the server code in src/backend/libpq/pqcomm.c
and restarted the server with this. In the log file /data/postgresql11/data/serverlog
are other messages about length of packages, like:
2020-04-28 09:49:49.877 CEST [16229] LOG: invalid length of startup packet
2020-04-28 09:49:50.117 CEST [16231] LOG: invalid length of startup packet
They're coming from:
grep 'invalid length of startup packet' src/backend/*/*.c
src/backend/postmaster/postmaster.c: errmsg("invalid length of startup packet")));
I will change the code there to to get the 'len' printed with the
message
...
if (len < (int32) sizeof(ProtocolVersion) ||
len > MAX_STARTUP_PACKET_LENGTH)
{
ereport(COMMERROR,
(errcode(ERRCODE_PROTOCOL_VIOLATION),
errmsg("invalid length %d of startup packet", len)));
return STATUS_ERROR;
}
--
Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
May, 9: Спаси́бо освободители! Thank you very much, Russian liberators!
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: guru@unixarea.de
Subject: Re: PostgreSQL client hangs sometimes on 'EXEC SQL PREPARE sid_sisisinst FROM :select_anw;'
In-Reply-To: <20200428081018.GB4007@sh4-5.1blu.de>
References: <20200427122123.GA11416@sh4-5.1blu.de> <5198.1587991204@sss.pgh.pa.us> <20200427130618.GA24964@sh4-5.1blu.de> <20200427131955.GB24964@sh4-5.1blu.de> <20200428081018.GB4007@sh4-5.1blu.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox