Tom Lane wrote:
I suspect valgrind is complaining because XLogInsert is memcpy'ing aAs far as I remember (couldn't find modern documentation on the matter) Valgrind is resitant to this problem. When a block of memory is copied, the initialized/uninitialized status is copied along. It only complains when an actual operation is performed using uninitialized memory. This was developed for the explicit reason of avoiding the problem you describe.
struct that has allocation padding in it. Which of course is a bogus
complaint ...
Shachar
Found it: http://developer.kde.org/~sewardj/docs-2.0.0/mc_main.html, section 3.3.2
It is important to understand that your program can copy around junk (uninitialised) data to its heart's content. Memcheck observes this and keeps track of the data, but does not complain. A complaint is issued only when your program attempts to make use of uninitialised data.
What IS possible, however, is that there is a bug in one of the underlying libraries.
-- Shachar Shemesh Lingnu Open Source Consulting http://www.lingnu.com/
---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives?
http://archives.postgresql.org