Re: [HACKERS] Why does logical replication launcher setapplication_name?

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [HACKERS] Why does logical replication launcher setapplication_name?
Дата
Msg-id e7451f20-d6e7-4243-14db-e9e90fecb99a@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Why does logical replication launcher set application_name?  (Masahiko Sawada <sawada.mshk@gmail.com>)
Ответы Re: [HACKERS] Why does logical replication launcher setapplication_name?  (Petr Jelinek <petr.jelinek@2ndquadrant.com>)
Список pgsql-hackers
On 6/2/17 02:31, Masahiko Sawada wrote:
> On Wed, May 31, 2017 at 12:10 PM, Peter Eisentraut
> <peter.eisentraut@2ndquadrant.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] Error while creating subscription when server isrunning in single user mode
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] Why does logical replication launcher setapplication_name?