fix: keep compacted query attribution honest - #150
Closed
NikolayS wants to merge 2 commits into
Closed
Conversation
Owner
Author
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.
Closes #136
Summary
top('query_id')readsbackend_secondsandpctreconcile to total AASquery_idfilter inaas,timeline,top, and inheritedcomparepathsTDD evidence
A real packed sample contains 26 backend appearances: q111=3, q222=2, q333=1, and NULL=20. With
rollup_min_backend_seconds = 3, the stored minutequery_countsis only[111,3].Before the fix, rollup-backed
top('query_id')reported q111 as 3 seconds and 100% of query load. After the fix it reports:An independent hourly-rollup fixture produced the same reconciliation after hourly top-set compaction.
Validation
Postgres 18:
rollup_1hresidual and explicit-filter checkgit diff --checkThe hosted PG14–PG19 beta and no-cron matrix is left to this draft PR.