From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Dave Page <dpage(at)pgadmin(dot)org>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Dimitri Fontaine <dfontaine(at)hi-media(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Application name patch - v2 |
Date: | 2009-10-20 06:47:36 |
Message-ID: | 9837222c0910192347y42cb0c6cy2c0a1e8076f60ff1@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2009/10/20 Bruce Momjian <bruce(at)momjian(dot)us>:
> Robert Haas wrote:
>> > I do agree with Peter's concerns about limiting the character set of the
>> > name string, and maybe there should be some sort of length limit too.
>>
>> I don't have a strong feeling about this. If limiting this to 7-bit
>> characters solves some nasty encoding problems or something, then
>> fine, but otherwise I think we can just escape what we emit into the
>> log and say that users who log this information should have a
>> sufficiently sophisticated log parser to cope with it.
>
> Once problem I can imagine is someone with a long log_line prefix, like
> '%t %a|', and assuming that the pipe is the end of the log_prefix
> arguments. If someone adds a pipe to the application name, log parsing
> code will assume the %a pipe ends the log_line_prefix, and we have no
> system of escaping things like pipes in log_line_prefix.
>
> Effectively, if you use %a, there is no good way to terminate
> log_line_prefix with a known unique character.
If you're going to parse your logfile, you should probably be using
CSV format logs, which I believe would not have this issue...
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2009-10-20 06:57:26 | Re: Could postgres be much cleaner if a future release skipped backward compatibility? |
Previous Message | Bruce Momjian | 2009-10-20 06:21:11 | Re: Controlling changes in plpgsql variable resolution |