diff --git a/flow/connectors/postgres/qrep.go b/flow/connectors/postgres/qrep.go index 99f41f29e1..abc4fa9a1e 100644 --- a/flow/connectors/postgres/qrep.go +++ b/flow/connectors/postgres/qrep.go @@ -100,7 +100,8 @@ func (c *PostgresConnector) getNumRowsPartitions( // if there is no last partition, we will return a partition with the min and max values // if there is a last partition, we will return a partition with the last partition's end value + 1 and the max value if last != nil && last.Range != nil { - minVal = minValInt + 1 + maxValInt += 1 + minVal = minValInt } if minValInt > maxValInt {