Andres Freund <andres@anarazel.de> writes:
> On 2016-04-14 13:11:43 -0400, Tom Lane wrote:
>> Proposed patch attached, but I'm still wondering why the alignment-picky
>> buildfarm members aren't all failing on this. It seems to strongly
>> suggest that the regression tests' coverage is lacking here.
> Well, then Christoph's build wouldn't have caught the issue either?
> Coverage isn't perfect, but it's not bad:
> http://coverage.postgresql.org/src/backend/replication/logical/reorderbuffer.c.gcov.html
BTW, so far as that goes, the question is whether we ever come through
here with two tuples of which the first has a t_len that's not aligned
at least on a 4-byte boundary. gcov can't tell you that.
I put in an Assert and satisfied myself that the current tests do *not*
ever create such a case. I tried modifying the test by adding updates
that set a trailing text field to different-length strings, and still
couldn't make it happen. So something is rounding off the tuple length,
though only to sizeof(int) not to maxalign, which is very curious.
regards, tom lane