Jan Wieck JanWieck at Yahoo.com
Fri May 4 05:31:17 PDT 2012
On 5/2/2012 5:55 PM, Steve Singer wrote:
> I think we are calling dstring_data on some strings in remote_worker.c
> that are built up with _append and don't have a termination call on them.
>
> https://github.com/ssinger/slony1-engine/commit/e98a0567a32c81a635aff56c44b1eb45e7b4da16
>
> Maybe the terminate would be done in the remote helper when we are
> finished building each string but I wasn't confident on where in the
> remote helper this should go.  The while loop was big and had a few
> breaks in it.  I am more confident in the correctness of putting this here.
>
> Is my reasoning correct?

We've had trouble with unterminated dstrings before. Maybe it is time to 
use a bigger hammer, always terminate the string when appending and get 
rid of the explicit dstring_terminate() altogether? We really don't have 
the need for this optimization, because slon isn't known to be a CPU hog.


Jan

-- 
Anyone who trades liberty for security deserves neither
liberty nor security. -- Benjamin Franklin


More information about the Slony1-hackers mailing list