pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Edward J. Sabol <edwardjsabol@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: pg_stat_activity's client_addr column contains "::1" but actually comes from elsewhere?
Date: Mon, 16 Nov 2020 16:49:11 -0500
Message-ID: <858450.1605563351@sss.pgh.pa.us> (raw)
In-Reply-To: <371E399B-8751-4A50-890D-02F899581EB6@gmail.com>
References: <371E399B-8751-4A50-890D-02F899581EB6@gmail.com>

"Edward J. Sabol" <edwardjsabol@gmail.com> writes:
> Hello! I'm trying to track down where some connections are coming from. "select pid,client_addr,client_hostname from pg_stat_activity" shows multiple entries with values with client_addr = "::1". "client_hostname" is blank for all entries, by the way, and unhelpful in this scenario. Also, "state" is "idle" for these entries I'm interested in, in case that matters.
> ::1 would imply the IPv6 loopback address, so that means the connection is coming from a process on the server, right? But I'm positive there is no process on this server that is connecting to PostgreSQL (other than my psql session).

> So where are they actually coming from and why is PostgreSQL seemingly misreporting them as coming from ::1?

Well, unless the kernel is lying to us, that is where the connection
came from.  Perhaps snooping around with netstat and lsof (if you have
it) would be helpful.

			regards, tom lane





view thread (4+ messages)  latest in thread

Message-ID: <858450.1605563351@sss.pgh.pa.us>
Permalink:  ../858450.1605563351@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/858450.1605563351@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, edwardjsabol@gmail.com
  Subject: Re: pg_stat_activity's client_addr column contains "::1" but actually comes from elsewhere?
  In-Reply-To: <858450.1605563351@sss.pgh.pa.us>

* 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