Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jTLKT-0004Q9-9T for pgsql-general@arkaria.postgresql.org; Tue, 28 Apr 2020 08:10:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jTLJw-0004FN-Qn for pgsql-general@arkaria.postgresql.org; Tue, 28 Apr 2020 08:10:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jTLJw-0004FG-Ik for pgsql-general@lists.postgresql.org; Tue, 28 Apr 2020 08:10:24 +0000 Received: from smh-06.1blu.de ([178.254.0.206]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jTLJt-0006t2-VI for pgsql-general@lists.postgresql.org; Tue, 28 Apr 2020 08:10:24 +0000 Received: from [172.16.29.5] (helo=sh4-5.1blu.de) by smh-06.1blu.de with esmtp (Exim 4.86_2) (envelope-from ) id 1jTLJq-0007ct-86; Tue, 28 Apr 2020 10:10:18 +0200 Received: from ftp51246-2575596 by sh4-5.1blu.de with local (Exim 4.90_1) (envelope-from ) id 1jTLJq-00056H-5o; Tue, 28 Apr 2020 10:10:18 +0200 Date: Tue, 28 Apr 2020 10:10:18 +0200 From: Matthias Apitz To: pgsql-general@lists.postgresql.org Subject: Re: PostgreSQL client hangs sometimes on 'EXEC SQL PREPARE sid_sisisinst FROM :select_anw;' Message-ID: <20200428081018.GB4007@sh4-5.1blu.de> Reply-To: Matthias Apitz 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200427131955.GB24964@sh4-5.1blu.de> X-Operating-System: FreeBSD 12.0-CURRENT r314251 (amd64) X-message-flag: Mails containing HTML will not be read! Please send only plain text. User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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!