Merged
Conversation
Use arp.end_time >= 'infinity' instead of = 'infinity' in the static active IP collection query, which runs every 30 minutes. The semantics are identical since nothing is greater than infinity. This change can significantly improve query performance on installations where partial indexes have been defined with a >= 'infinity' clause, as PostgreSQL can then use the partial index directly instead of combining it with a full index scan via BitmapAnd.
|
Test results 20 files 20 suites 25m 1s ⏱️ Results for commit 6562f77. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 5.17.x #3793 +/- ##
==========================================
+ Coverage 63.33% 63.36% +0.02%
==========================================
Files 619 619
Lines 45875 45875
Branches 43 43
==========================================
+ Hits 29057 29070 +13
+ Misses 16808 16795 -13
Partials 10 10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
johannaengland
approved these changes
Feb 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Scope and purpose
Use
arp.end_time >= 'infinity'instead of= 'infinity'in the static active IP collection query (get_static_query()inactiveipcollector/collector.py), which runs every 30 minutes via cron.The semantics are identical since nothing is greater than infinity. This change can significantly improve query performance on installations where partial indexes have been defined with a
>= 'infinity'clause, as PostgreSQL can then use the partial index directly instead of combining it with a full index scan via BitmapAnd.Tested on a production database: query time dropped from ~50s to ~5s with a suitable partial index in place.
Contributor Checklist
Added/amended tests for new/changed codeAdded/changed documentation<major>.<minor>.x). For a new feature or other additions, it should be based onmaster.If applicable: Created new issues if this PR does not fix the issue completely/there is further work to be doneIf this results in changes in the UI: Added screenshots of the before and afterIf this adds a new Python source code file: Added the boilerplate header to that file