Further improvements to c8f621c43.

Andres Freund <andres@anarazel.de>

Commit: e3e84fd35838a43feef94ea78534713d745e9a08
Author: Andres Freund <andres@anarazel.de>
Date: 2016-03-07T22:24:58Z
Releases: 9.4.7
Further improvements to c8f621c43.

Coverity and inspection for the issue addressed in fd45d16f found some
questionable code.

Specifically coverity noticed that the wrong length was added in
ReorderBufferSerializeChange() - without immediate negative consequences
as the variable isn't used afterwards.  During code-review and testing I
noticed that a bit of space was wasted when allocating tuple bufs in
several places.  Thirdly, the debug memset()s in
ReorderBufferGetTupleBuf() reduce the error checking valgrind can do.

Backpatch: 9.4, like c8f621c43.

Files