Re: [PATCHES] COPYable logs

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: [PATCHES] COPYable logs
Дата
Msg-id 46C8740F.3020505@dunslane.net
обсуждение исходный текст
Ответы Re: [PATCHES] COPYable logs
Список pgsql-hackers
[redirected to -hackers]

Tom Lane wrote:
> Another thing that needs to be looked at carefully is how much memory
> write_csvlog() eats.  I'm a little bit concerned about whether it will
> result in infinite recursion when our backs are against the wall and
> we only have the original 8K in ErrorContext to work in.  (We could
> increase that figure if need be, but we need to know by how much.)
>
>
>   


I think we can make a saving by rearranging the end of 
send_message_to_server_log() so we can call pfree(buf.data) before we 
call write_csvlog(). We can probably make a further saving by changing 
how we put the CSV-escaped error message on the end of the buffer we 
send down the pipe. I will look into those.

If these prove difficult, I'd say 24K would put us in an equivalent 
position (two extra copies of the error message plus change). Even so, 
I'm inclined to say that 8K is very tight. It might be enough for very 
small startup messages, but is the context size likely to stay at 8K for 
non-trivial uses? A single logged complex query or function body would 
easily blow it.

cheers

andrew




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: INSERT/SELECT and excessive foreign key checks
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCHES] COPYable logs