From: Alex P. <pes...@ma...> - 2010-11-19 09:31:21
|
On 11/19/10 12:02, Dmitry Yemanov wrote: > Alex, > >> The question is - are there any requirements in our API to what is >> placed in the message buffer as a data for varchar field with zero >> length? Should it be NULLs or may it be garbage? > I believe garbage is acceptable, not only for zero-length strings but > also for NULLs (as we have an indicator stored separately). Although I > remember a hack we have regarding blobs: NULL blob must have zero blob > id, otherwise some applications started to work unpredictably, so we may > be sure that some applications ignore our API rules :-) > > But nothing prevents us from choosing the way which is better in > practice. You know that any record buffer is initially zapped with > zeroes to allow better compression later. So we may do the same for the > message buffers, unless it's proven to be too much expensive (as the > message processing is mostly CPU bound). > Taking into an account that some other application may also ignore length, I will first try with zeroes initializing message buffers in remote and see how does it affect performance. gbak's backup appears to be very good test for it. |