Tomas Vondra <tomas.vondra@2ndquadrant.com> writes:
> I believe the attached patch should fix this by actually copying the
> tuples into the densely allocated chunks. Haven't tested it though, will
> do in a few hours.
BTW, I confirmed that this patch fixes the wrong-number-of-output-tuples
issue in the test case from bug #13908. So that shows that the diagnosis
is correct. We still need to clean up the patch, but this way does work
to fix the problem.
regards, tom lane