From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
Cc: | Noah Misch <noah(at)leadboat(dot)com>, Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Craig Ringer <craig(at)2ndquadrant(dot)com>, Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Why does logical replication launcher set application_name? |
Date: | 2017-06-02 19:05:33 |
Message-ID: | e7451f20-d6e7-4243-14db-e9e90fecb99a@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 6/2/17 02:31, Masahiko Sawada wrote:
> On Wed, May 31, 2017 at 12:10 PM, Peter Eisentraut
> <peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
>> Here is a proposed solution that splits bgw_name into bgw_type and
>> bgw_name_extra. bgw_type shows up in pg_stat_activity.backend_type.
>> Uses of application_name are removed, because they are no longer
>> necessary to identity the process type.
>
> Hmm, is there any reasons why bgw_name_extra string doesn't appear in
> pg_stat_activity?
That's the whole point: We want to be able to group similar process
types. The _extra part is particular to a single process, so it might
contain a specific OID or PID it is working on. The bgw_type is common
for all workers of that kind.
> I'd say current patch makes the user difficult to
> distinguish between apply worker and table sync worker.
We could arguably make apply workers and sync workers have different
bgw_type values. But if you are interested in that level of detail, you
should perhaps look at pg_stat_subscription. pg_stat_activity only
contains the "common" data, and the process-specific data is in other views.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2017-06-02 19:08:09 | Re: Why does logical replication launcher set application_name? |
Previous Message | Peter Eisentraut | 2017-06-02 19:00:21 | Re: Error while creating subscription when server is running in single user mode |