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 1pujbh-0007A3-2V for pgsql-admin@arkaria.postgresql.org; Fri, 05 May 2023 00:47:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pujbf-0004QN-SS for pgsql-admin@arkaria.postgresql.org; Fri, 05 May 2023 00:47:31 +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 1pujbf-0004QD-He for pgsql-admin@lists.postgresql.org; Fri, 05 May 2023 00:47:31 +0000 Received: from mout-u-107.mailbox.org ([80.241.59.207]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pujbc-000Zwa-VK for pgsql-admin@lists.postgresql.org; Fri, 05 May 2023 00:47:30 +0000 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-107.mailbox.org (Postfix) with ESMTPS id 4QCBq04THjz9sd7; Fri, 5 May 2023 02:47:24 +0200 (CEST) Date: Fri, 5 May 2023 02:47:24 +0200 (CEST) From: Erik Wienhold To: Rui DeSousa Cc: "pgsql-admin@lists.postgresql.org" Message-ID: <106621723.1703032.1683247644104@office.mailbox.org> In-Reply-To: <0C6316A9-43ED-46B1-B3E6-8E22C57FBA07@crazybean.net> References: <1123557200.1646445.1683195543242@office.mailbox.org> <10E1C934-CAAF-4863-A774-714B92DFC251@crazybean.net> <1151082415.1702693.1683239466943@office.mailbox.org> <0C6316A9-43ED-46B1-B3E6-8E22C57FBA07@crazybean.net> Subject: Re: pg_stat_activity.client_addr sometimes null for host connections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Normal List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 05/05/2023 01:54 CEST Rui DeSousa wrote: > > Could it be that the process you are seeing is a parallel worker? That would > not have client_addr populated as only the leader process has client_addr > populated. That's it. They're indeed all parallel workers. I didn't know that. I always found datname is not null and usename is not null to be sufficient for only considering client connections. Safes me a few keystrokes from now. Thanks a lot! -- Erik