Skip to content

Commit 0e24283

Browse files
Jim NasbyJim Nasby
authored andcommitted
repack_apply(): Use default if count is negative
Per documentation, a negative value for count should result in using DEFAULT_PEEK_COUNT.
1 parent f255a41 commit 0e24283

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/repack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ repack_apply(PG_FUNCTION_ARGS)
237237
bool nulls[3]; /* id, pk, row */
238238

239239
/* peek tuple in log */
240-
if (count == 0)
240+
if (count <= 0)
241241
values_peek[0] = Int32GetDatum(DEFAULT_PEEK_COUNT);
242242
else
243243
values_peek[0] = Int32GetDatum(Min(count - n, DEFAULT_PEEK_COUNT));

0 commit comments

Comments
 (0)