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 1lauMh-0005Ld-02 for pgsql-general@arkaria.postgresql.org; Mon, 26 Apr 2021 06:05:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lauMf-00023c-V3 for pgsql-general@arkaria.postgresql.org; Mon, 26 Apr 2021 06:05:01 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lauMf-00023H-N0 for pgsql-general@lists.postgresql.org; Mon, 26 Apr 2021 06:05:01 +0000 Received: from ms-10.1blu.de ([178.254.4.101]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lauMc-0005gw-UZ for pgsql-general@lists.postgresql.org; Mon, 26 Apr 2021 06:05:00 +0000 Received: from [188.174.57.250] (helo=c720-r368166.unixarea.de) by ms-10.1blu.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lauMb-0002YW-1d; Mon, 26 Apr 2021 08:04:57 +0200 Received: from c720-r368166.fritz.box (localhost [127.0.0.1]) by c720-r368166.unixarea.de (8.16.1/8.14.9) with ESMTPS id 13Q64us0001691 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 26 Apr 2021 08:04:56 +0200 (CEST) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by c720-r368166.fritz.box (8.16.1/8.14.9/Submit) id 13Q64tdf001690; Mon, 26 Apr 2021 08:04:55 +0200 (CEST) (envelope-from guru@unixarea.de) X-Authentication-Warning: c720-r368166.fritz.box: guru set sender to guru@unixarea.de using -f Date: Mon, 26 Apr 2021 08:04:55 +0200 From: Matthias Apitz To: pgsql-general@lists.postgresql.org Subject: Re: client waits for end of update operation and server proc is idle Message-ID: Reply-To: Matthias Apitz References: <0551daad25ee518071e002ca17c4b6dac08a236c.camel@cybertec.at> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Operating-System: FreeBSD 13.0-CURRENT r368166 (amd64) X-message-flag: Mails containing HTML will not be read! Please send only plain text. X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 188.174.57.250 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk El día lunes, abril 26, 2021 a las 07:38:40a. m. +0200, Matthias Apitz escribió: > Having solved this issue, one last question: Is there any good way for a > C-written or ESQL/C-written client to get the local port number or even > the PID of the PostgreSQL server process on the other end of the > connection for logging/tracing purpose? Ah, I found it as int PQbackendPID(const PGconn *conn); One should read firt the fine documentatio befor asking stupid questions: https://www.postgresql.org/docs/11/libpq-status.html matthias -- Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045 Public GnuPG key: http://www.unixarea.de/key.pub ¡Con Cuba no te metas! «» Don't mess with Cuba! «» Leg Dich nicht mit Kuba an! http://www.cubadebate.cu/noticias/2020/12/25/en-video-con-cuba-no-te-metas/