diff --git a/keyserver/storage/postgres/key_changes_table.go b/keyserver/storage/postgres/key_changes_table.go index d7f0991a6..df4b47e79 100644 --- a/keyserver/storage/postgres/key_changes_table.go +++ b/keyserver/storage/postgres/key_changes_table.go @@ -82,6 +82,7 @@ func (s *keyChangesStatements) SelectKeyChanges( if toOffset == sarama.OffsetNewest { toOffset = math.MaxInt64 } + latestOffset = fromOffset rows, err := s.selectKeyChangesStmt.QueryContext(ctx, partition, fromOffset, toOffset) if err != nil { return nil, 0, err diff --git a/keyserver/storage/sqlite3/key_changes_table.go b/keyserver/storage/sqlite3/key_changes_table.go index 32721eaea..b4753ccc5 100644 --- a/keyserver/storage/sqlite3/key_changes_table.go +++ b/keyserver/storage/sqlite3/key_changes_table.go @@ -83,6 +83,7 @@ func (s *keyChangesStatements) SelectKeyChanges( if toOffset == sarama.OffsetNewest { toOffset = math.MaxInt64 } + latestOffset = fromOffset rows, err := s.selectKeyChangesStmt.QueryContext(ctx, partition, fromOffset, toOffset) if err != nil { return nil, 0, err