Re: pg_stat_activity.client_addr sometimes null for host connections

From: Rui DeSousa <rui(at)crazybean(dot)net>
To: Erik Wienhold <ewie(at)ewie(dot)name>
Cc: "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_stat_activity.client_addr sometimes null for host connections
Date: 2023-05-04 23:54:45
Message-ID: 0C6316A9-43ED-46B1-B3E6-8E22C57FBA07@crazybean.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> On May 4, 2023, at 6:31 PM, Erik Wienhold <ewie(at)ewie(dot)name> wrote:
>
> Could there be
> a race condition

There could be race condition — maybe OS related. I was not able to reproduce the issue while logging and logging out rapidly and continually querying pg_stat_activity table (tested on FreeBSD). Most of the time I didn’t even see the process at all in pg_stat_activity and when I did it had the client_addr propulated.

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.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Erik Wienhold 2023-05-05 00:47:24 Re: pg_stat_activity.client_addr sometimes null for host connections
Previous Message Erik Wienhold 2023-05-04 22:31:06 Re: pg_stat_activity.client_addr sometimes null for host connections