[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.



---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to