Inconsistency in extended-query-protocol logging - Mailing list pgsql-hackers

From Guillaume Smet
Subject Inconsistency in extended-query-protocol logging
Date
Msg-id 1d4e0c10609130552g6ebbb41v580edbfbf41bbde4@mail.gmail.com
Whole thread Raw
Responses Re: Inconsistency in extended-query-protocol logging  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Getting a move on for 8.2 beta
Next
From: Tom Dunstan
Date:
Subject: Re: Getting a move on for 8.2 beta