Inconsistency in extended-query-protocol logging

Поиск
Список
Период
Сортировка
От Guillaume Smet
Тема Inconsistency in extended-query-protocol logging
Дата
Msg-id 1d4e0c10609130552g6ebbb41v580edbfbf41bbde4@mail.gmail.com
обсуждение исходный текст
Ответы Re: Inconsistency in extended-query-protocol logging  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Getting a move on for 8.2 beta
Следующее
От: Tom Dunstan
Дата:
Сообщение: Re: Getting a move on for 8.2 beta