Re: Why does logical replication launcher set application_name?

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>, 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-04-20 19:31:03
Message-ID: fc44c1e2-90c8-a57c-37b3-02425c01235a@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 4/18/17 12:37, Tom Lane wrote:
> Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
>> I think showing bgw_name as backend_type always sounds reasonable. No
>> need to treat external implementations differently.
>
> That's definitely an approach we could use. It would encourage people
> to use short bgw_names, which is a constraint that wasn't especially
> apparent before, but I don't think that's a bad thing.

Actually, bgw_name is probably not food for
pg_stat_activity.backend_type, since it's often not the same for all
background workers of the same kind. For example, it might be "parallel
worker for PID %d". Ideally, a background worker would have a bgw_type
field and perhaps a bgw_name_extra field. However, a background worker
might also want to update some part of that dynamically, to change the
process title. Many details depend on the particular background workers.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2017-04-20 19:33:42 Re: Why does logical replication launcher set application_name?
Previous Message Andres Freund 2017-04-20 19:25:00 Re: OK, so culicidae is *still* broken