Inconsistency in extended-query-protocol logging

From: "Guillaume Smet" <guillaume(dot)smet(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Inconsistency in extended-query-protocol logging
Date: 2006-09-13 12:52:33
Message-ID: 1d4e0c10609130552g6ebbb41v580edbfbf41bbde4@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom,

I'm currently resyncing my parser with the changes you made to
prepared statement logging. Everything is OK apart from an
inconsistency between log_duration and log_min_duration_statement.

* With log_duration, we have:
protocol : LOG: statement: execute my_query: SELECT * FROM shop WHERE $1 = $2
query : LOG: statement: EXECUTE test1('lop1', 'lop2')

* With log_min_duration_statement, we have:
protocol: LOG: duration: 235.345 ms execute insert_query: INSERT
INTO shop (name) VALUES($1)
query: LOG: duration: 0.187 ms statement: EXECUTE test1('lop1', 'lop2')

As you can see, in the log_duration case, we always have the
"statement: " part but we don't have it in log_min_duration_statement
case when using protocol.

I attached a patch to improve the consistency. It adds statement: for
every case. Note that statement was not there in the first version of
Bruce and he added it after so I keep it in this patch. I don't really
care if we have statement: or not but I'd really like a consistent
behaviour between both configuration.

Thanks,

--
Guillaume

Attachment Content-Type Size
log_protocol_statement.diff text/x-patch 1.6 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2006-09-13 13:50:49 Re: Getting a move on for 8.2 beta
Previous Message Alvaro Herrera 2006-09-13 12:26:22 Re: Getting a move on for 8.2 beta