Re: [HACKERS] idea: custom log_line_prefix components besides application_name - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [HACKERS] idea: custom log_line_prefix components besides application_name
Date
Msg-id CA+TgmoZZfTeOP1TKtbXfRH45sYYYygHSeZMW_JU38E6q6h4mPA@mail.gmail.com
Whole thread Raw
In response to [HACKERS] idea: custom log_line_prefix components besides application_name  (Chapman Flack <chap@anastigmatix.net>)
Responses Re: [HACKERS] idea: custom log_line_prefix components besidesapplication_name  (David Fetter <david@fetter.org>)
List pgsql-hackers
On Thu, May 4, 2017 at 10:59 AM, Chapman Flack <chap@anastigmatix.net> wrote:
> invalid input syntax for integer: "21' && 1=2)) Uni/**/ON
> SEl/**/eCT 0x646665743166657274,0x646665743266657274,
> 0x646665743366657274 -- "

Now that is choice.  I wonder what specific database system that's targeting...

> I just wonder if anybody thinks web apps, and therefore this
> scenario, are common enough these days to maybe justify one
> or two more GUCs with their own log_line_prefix escapes, such
> as app_client_addr or app_user. Naturally they would only be
> as reliable as the app setting them, and uninterpreted by
> PostgreSQL itself, and so functionally no different from the
> uninterpreted string already available as application_name.
> The benefit is perhaps to be clearer than just overloading
> application_name to carry two or three pieces of information
> (and perhaps privacy, if you care about app user identities and
> source IPs showing up in ps titles).
>
> Worth considering, or is application_name Good Enough?

I mean, if there were a list of things that needed to propagated that
was (1) lengthy and (2) universally agreed, then we'd probably want
more than one field.  But your list is pretty short, so I guess I
don't see why you can't just join them together with a punctuation
mark of your choice and call it good.

I might be missing something, though.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] Not getting error if ALTER SUBSCRIPTION syntax is wrong.
Next
From: Rod Taylor
Date:
Subject: Re: [HACKERS] Row Level Security UPDATE Confusion