Re: PostgreSQL client hangs sometimes on 'EXEC SQL PREPARE sid_sisisinst FROM :select_anw;'

From: Matthias Apitz <guru(at)unixarea(dot)de>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: PostgreSQL client hangs sometimes on 'EXEC SQL PREPARE sid_sisisinst FROM :select_anw;'
Date: 2020-04-28 08:10:18
Message-ID: 20200428081018.GB4007@sh4-5.1blu.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


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(at)unixarea(dot)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!

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Taylor Sarrafian 2020-04-28 20:58:23 GIN Expression Indexes
Previous Message Mahendra Singh Thalor 2020-04-27 14:27:26 Re: How to debug "background worker "parallel worker" (PID 32152) was terminated by signal 11: Segmentation fault"