Merge branch 'decibel-Fix-repack_apply-count-bug'

This commit is contained in:
Josh Kupershmidt 2015-10-14 09:39:55 -04:00
commit 20a679b7fb

View File

@ -242,7 +242,7 @@ repack_apply(PG_FUNCTION_ARGS)
bool nulls[3]; /* id, pk, row */
/* peek tuple in log */
if (count == 0)
if (count <= 0)
values_peek[0] = Int32GetDatum(DEFAULT_PEEK_COUNT);
else
values_peek[0] = Int32GetDatum(Min(count - n, DEFAULT_PEEK_COUNT));