Re: auxiliary processes in pg_stat_ssl

From: Euler Taveira <euler(at)timbira(dot)com(dot)br>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: auxiliary processes in pg_stat_ssl
Date: 2019-11-04 15:39:49
Message-ID: CAHE3wgjXmM3z5_+931Q_kgPxjH16T7qgrwHxc3RLZd=bMXz51Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Em qua., 4 de set. de 2019 às 12:15, Alvaro Herrera
<alvherre(at)2ndquadrant(dot)com> escreveu:
>
> I just noticed that we list auxiliary processes in pg_stat_ssl:
>
> 55432 13devel 28627=# select * from pg_stat_ssl ;
> pid │ ssl │ version │ cipher │ bits │ compression │ client_dn │ client_serial │ issuer_dn
> ───────┼─────┼─────────┼────────────────────────┼──────┼─────────────┼───────────┼───────────────┼───────────
> 28618 │ f │ │ │ │ │ │ │
> 28620 │ f │ │ │ │ │ │ │
> 28627 │ t │ TLSv1.3 │ TLS_AES_256_GCM_SHA384 │ 256 │ f │ │ │
> 28616 │ f │ │ │ │ │ │ │
> 28615 │ f │ │ │ │ │ │ │
> 28617 │ f │ │ │ │ │ │ │
> (6 filas)
>
> 55432 13devel 28627=# select pid, backend_type from pg_stat_activity ;
> pid │ backend_type
> ───────┼──────────────────────────────
> 28618 │ autovacuum launcher
> 28620 │ logical replication launcher
> 28627 │ client backend
> 28616 │ background writer
> 28615 │ checkpointer
> 28617 │ walwriter
> (6 filas)
>
> But this seems pointless. Should we not hide those? Seems this only
> happened as an unintended side-effect of fc70a4b0df38. It appears to me
> that we should redefine that view to restrict backend_type that's
> 'client backend' (maybe include 'wal receiver'/'wal sender' also, not
> sure.)
>
Yep, it is pointless. BackendType that open connections to server are:
autovacuum worker, client backend, background worker, wal sender. I
also notice that pg_stat_gssapi is in the same boat as pg_stat_ssl and
we should constraint the rows to backend types that open connections.
I'm attaching a patch to list only connections in those system views.

--
Euler Taveira Timbira -
http://www.timbira.com.br/
PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Attachment Content-Type Size
0001-Show-only-rows-that-open-connections-in-some-system-.patch text/x-patch 3.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rafia Sabih 2019-11-04 15:41:40 Re: adding partitioned tables to publications
Previous Message Julien Rouhaud 2019-11-04 15:18:46 Re: Collation versioning