Re: [HACKERS] Why does logical replication launcher setapplication_name? - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [HACKERS] Why does logical replication launcher setapplication_name?
Date
Msg-id fc44c1e2-90c8-a57c-37b3-02425c01235a@2ndquadrant.com
Whole thread Raw
In response to Re: [HACKERS] Why does logical replication launcher set application_name?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 4/18/17 12:37, Tom Lane wrote:
> Peter Eisentraut <peter.eisentraut@2ndquadrant.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



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [HACKERS] OK, so culicidae is *still* broken
Next
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] Why does logical replication launcher setapplication_name?