Re: selective statement logging

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: selective statement logging
Дата
Msg-id 404FAA14.1010307@dunslane.net
обсуждение исходный текст
Ответ на Re: selective statement logging  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: selective statement logging  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers

Tom Lane wrote:

>Andrew Dunstan <andrew@dunslane.net> writes:
>  
>
>>If people are happy with suppressing statement logging on a parse error, 
>>OK.
>>    
>>
>
>I think that's a really, really awful idea.  Not infrequently, the
>postmaster log is the easiest way of debugging applications that are
>sending bogus SQL.  If you fail to log the bogus SQL then you've just
>cut debuggers off at the knees.
>
>I haven't read the earlier part of the thread yet so I don't know just
>what problem you want to solve, but please not this solution.
>
>  
>
I had a small bet with myself that you'd say that :-)

I agree with you. Actually, I think I can improve the present situation. 
Currently, if log_statement is not turned on and you send a query that 
doesn't parse, all you get is the error trace. By deferring it till 
right after the parse we can force logging of the query string on a 
parse error, regardless of that setting (which seems to me to be a very 
desirable outcome).  The only thing is that you will get the error trace 
first (because it comes from the parser) rather than the query string first.

That should keep you happy, I hope ;-)

(The problem being addressed in this thread is to allow selective 
logging of DDL/DML statements - see the TODO list. Someone was actually 
asking for exactly this on irc today.).

cheers

andrew





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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: selective statement logging
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: [PATCHES] NO WAIT ...