pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Erik Wienhold <ewie@ewie.name>
To: Rui DeSousa <rui@crazybean.net>
Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: pg_stat_activity.client_addr sometimes null for host connections
Date: Fri, 5 May 2023 02:47:24 +0200 (CEST)
Message-ID: <106621723.1703032.1683247644104@office.mailbox.org> (raw)
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>

> On 05/05/2023 01:54 CEST Rui DeSousa <rui@crazybean.net> 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





view thread (5+ messages)

Message-ID: <106621723.1703032.1683247644104@office.mailbox.org>
Permalink:  ../106621723.1703032.1683247644104@office.mailbox.org/
Also on:    postgresql.org/message-id/106621723.1703032.1683247644104@office.mailbox.org

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: ewie@ewie.name, rui@crazybean.net, pgsql-admin@lists.postgresql.org
  Subject: Re: pg_stat_activity.client_addr sometimes null for host connections
  In-Reply-To: <106621723.1703032.1683247644104@office.mailbox.org>

* 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