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

From Tom Lane
Subject Re: [HACKERS] Why does logical replication launcher set application_name?
Date
Msg-id 14600.1492535939@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Why does logical replication launcher setapplication_name?  (Petr Jelinek <petr.jelinek@2ndquadrant.com>)
Responses Re: [HACKERS] Why does logical replication launcher setapplication_name?  (Petr Jelinek <petr.jelinek@2ndquadrant.com>)
Re: [HACKERS] Why does logical replication launcher setapplication_name?  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
Petr Jelinek <petr.jelinek@2ndquadrant.com> writes:
> On 18/04/17 18:24, Peter Eisentraut wrote:
>> I don't see why we need to do that.  It is showing the correct
>> information, isn't it?

> It does, but it's also one of the things Tom complained about and I
> think he is right in that at least values for launcher should be
> filtered out there as there is not much meaning in what is shown for
> launcher. The ugly part is that we can't tell it's launcher in any other
> way than comparing bgw_library_name and bgw_function_name to specific
> values.

I think you're thinking about it wrong.  To my mind the issue is that
there should be some generic way to determine that a bgworker process
is or is not laboring on behalf of an identifiable user.  It's great
that we can tell which user it is when there is one, but clearly some
bgworkers will be providing general services that aren't associated with
a single user.  So it should be possible to set the userID to zero or
some such when the bgworker is one that isn't associated with a
particular user.  Maybe the owning user needs to become an additional
parameter passed in struct BackgroundWorker.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: [HACKERS] Why does logical replication launcher setapplication_name?
Next
From: Fujii Masao
Date:
Subject: Re: [HACKERS] some review comments on logical rep code