From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Rod Taylor <rbt(at)rbt(dot)ca> |
Cc: | PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: fix log_min_duration_statement logic error |
Date: | 2003-10-05 21:07:06 |
Message-ID: | 200310052107.h95L76I23765@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Rod Taylor wrote:
-- Start of PGP signed section.
> > have also added code to convert end-of-line characters to \n and \r, and
> > doubles backslashes. It also makes log_statement print as one line, and
> > shows pg_stat_activity as one line. Without this fix, you get:
>
> And how does it look with what was originally a fairly readable 30 or 40
> line query?
Probably pretty long. I think the pg_stat_activity case really needs
the "\n" because if not the query breaks the table output format. Not
sure about log_statement or log_min_duration_statement. Having it be
one line makes grep easy, and is probably easier for processing via
tools, but reading the log could be harder:
LOG: duration: 7.466 ms; select *\nfrom pg_class\nwhere oid = 3 and\nrelname = 'abcd' and\nrelkind = 'r'\norder by relname;
The old format output was:
LOG: duration: 7.466 ms; select *
from pg_class
where oid = 3 and
relname = 'abcd' and
relkind = 'r'
order by relname;
It is hard to understand how a tool would grab the query from the above
log except to look for another TAG: entry and stop there.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-10-05 21:07:43 | Re: fix log_min_duration_statement logic error |
Previous Message | Tom Lane | 2003-10-05 21:03:24 | Re: Open 7.4 items |