Re: proposal: hide application_name from other users - Mailing list pgsql-hackers

From Greg Stark
Subject Re: proposal: hide application_name from other users
Date
Msg-id CAM-w4HOYF-0Z0aCA7rgrXQexxLcnD1BLjzztQfokK7TNmW3Lsw@mail.gmail.com
Whole thread Raw
In response to Re: proposal: hide application_name from other users  (Magnus Hagander <magnus@hagander.net>)
Responses Re: proposal: hide application_name from other users  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
On Fri, Jan 24, 2014 at 6:46 AM, Magnus Hagander <magnus@hagander.net> wrote:
> What actually happens if you set the application_name in the connection
> string in that environment? Does it override it to it's own default? If so,
> the developers there clearly need to be taught about
> fallback_application_name.
>
> And what happens if you set it in PGAPPNAME?

My point wasn't that an application couldn't control this. The point
is that this isn't so easy to manage and users might not realize
there's anything to do.

And it's not necessarily the case that the library could warn users.
No one of the parts of the code here has the whole picture. In this
case one part of the code is stuffing the information in $0 and
another part is defaulting application_name to $0.

> Long term I agree we should really have some way of controlling these
> permissions more fine grained, but I just blanket hiding application name
> for non-superusers seems like a bad solution that still only fixes a small
> part of the problem.

It makes a lot of sense to me to treat it the same way as sql_query.
It's pretty similar (especially in the above given that we put the sql
query in $0 after all)


-- 
greg



pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: extension_control_path
Next
From: Magnus Hagander
Date:
Subject: Re: proposal: hide application_name from other users