[TNM] pgAdmin III entries getting picked up when they shouldn't be
Douglas J Hunley
doug.hunley at enterprisedb.com
Thu Jun 16 14:50:15 UTC 2016
On Thu, Jun 16, 2016 at 10:45 AM, Greg Sabino Mullane <greg at endpoint.com>
wrote:
> The issue seems to be that pgadmin is using whitespace inside it's
> SET application_name calls, which means tail_n_mail is failing to parse
> the lines correctly, and thus those lines you see are not really "matching"
> but are unknown, what-are-those-doing-there lines. A quick fix may be to
> change your log_line_prefix in your .tailnmailrc to:
>
> log_line_prefix = '%t [%p]: [%l-1] user=%u,db=%d,app'
>
I'll give this a shot
>
> Not ideal, I know. You could also remove the app=%a from your Postgres
> log_line_prefix, if you are not actively using it.
>
The client wants the app= preserved as they use it inside their app to show
what part of the app generated the query :(
>
> The problem is that we have no way of knowing when the application
> name ends and when the next field begin (in this case, a comma and
> the word 'client'). As the application_name field is very free-form,
> and does not get quoted, it can contain a comma. I do not know if
> there is a canonical solution to this problem, but perhaps we can at
> least devise some sort of clever workaround? Ideas and patches
> welcome.
>
Sounds like maybe PostgreSQL should quote the appname as I'm sure pgBadger
and other tools are all dealing with this too
Thanks for the assist! I'll see how this goes.
--
/ )/ \/ \
( / __ _\ ) Douglas J Hunley
\ (/ o) ( o) ) Certified Postgres Engineer & Trainer
\_ (_ ) \ ) _/ SSH: http://goo.gl/IUUkn7 PGP:
http://goo.gl/mdxx8u
\ /\_/ \)/
\/ <//| |\\>
_| |
\|_/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.endcrypt.com/pipermail/tnm/attachments/20160616/44bf9eb7/attachment.html>
More information about the TNM
mailing list