-
Notifications
You must be signed in to change notification settings - Fork 883
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Continuous aggregation calculation error #7019
Labels
Comments
Made a simplified repro for this:
The third-level real-time aggregate (weekly) gives the wrong result when it's not updated explicitly. |
@nieyuan1980 @akuzm actually this is not a bug and instead a limitation of the current Hierarchical Continuous Aggregate architecture. You need to always refresh all the caggs in the chain in order to properly move the watermark to get the correct results. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What type of bug is this?
Incorrect result
What subsystems and features are affected?
Continuous aggregate, Query executor
What happened?
There is a transformer and every 15 minutes the collector automatically records its readings.
Its readings are downsampled to the maximum hourly, daily, monthly, and yearly, respectively.
But it has an incredible number of data on continuous aggregation.
Step 1, the original table
We see that the current maximum readings are: 6339985.166
STEP 2, CREATE HOURLY DOWNSAMPLING (HERE I USED THE TIMESCALEDB.MATERIALIZED_ONLY = FALSE PARAMETER)
We see that its data is correct:6339985.166
Step 3, create a built-in daily downsampling (create a continuous aggregate on top of another continuous aggregate)
Its data is also correct:6339985.166
Step 3, Create a Built-in Monthly Downsampling (Create a Continuous Aggregate on Top of Another Continuous Aggregate)
The data here confuses me:6329992.613。 I think it should be:6339985.166
Excuse me, what is the reason for this? How should it be resolved?
TimescaleDB version affected
2.15.0
PostgreSQL version used
PostgreSQL 16.3
What operating system did you use?
(Ubuntu 16.3-1.pgdg22.04+1
What installation method did you use?
Deb/Apt
What platform did you run on?
Other
Relevant log output and stack trace
No response
How can we reproduce the bug?
The text was updated successfully, but these errors were encountered: