-
Notifications
You must be signed in to change notification settings - Fork 848
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
Remove parallel safe from partialize_agg #5172
Remove parallel safe from partialize_agg #5172
Conversation
Codecov Report
@@ Coverage Diff @@
## main #5172 +/- ##
==========================================
- Coverage 89.27% 89.27% -0.01%
==========================================
Files 225 225
Lines 51756 51755 -1
==========================================
- Hits 46206 46205 -1
Misses 5550 5550
Continue to review full report at Codecov.
|
8de4184
to
beaebf6
Compare
@sb230132, @nikkhils: please review this pull request.
|
tsl/test/sql/partialize_finalize.sql
Outdated
SET parallel_setup_cost = 0; | ||
|
||
-- Compare the results (should return NO ROWS) | ||
(SELECT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slightly confused by this test -- which subselect is the broken one? Maybe we could generate stable pseudo-random data and just show the results of both subselects. For pseudo-random we can use something like this: https://github.com/timescale/timescaledb/blob/main/tsl/test/sql/dist_param.sql#L20-L33
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also might be good to have an explain query so that we are absolutely sure it runs in parallel, because parallel execution is notoriously hard to achieve sometimes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're correct will update the tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK as a quick fix, but I wonder what's the root cause.
29d902a
to
7544b0a
Compare
Previous PR timescale#4307 mark `partialize_agg` and `finalize_agg` as parallel safe but this change is leading to incorrect results in some cases. Those functions are supposed work in parallel but seems is not the case and it is not evident yet the root cause and how to properly use it in parallel queries so we decided to revert this change and provide correct results to users. Fixes timescale#4922
7544b0a
to
d733b09
Compare
This release contains bug fixes since the 2.9.1 release. We recommend that you upgrade at the next available opportunity. **Bugfixes** * timescale#5180 Fix dist_cagg flaky test * timescale#5170 Fix CAgg on CAgg variable bucket size validation * timescale#5114 Fix issue with deleting data node and dropping database * timescale#5172 Remove parallel safe from partialize_agg * timescale#5162 Fix telemetry_stats test in PG15 * timescale#5130 Fix CAgg on CAgg variable bucket size validation * timescale#5133 Fix CAgg on CAgg different column order * timescale#5152 Fix adding column with NULL constraint * timescale#5136 Fix SELECT from partial compressed chunks * timescale#5181 Fix ChunkAppend, ConstraintAwareAppend child subplan
This release contains bug fixes since the 2.9.1 release. We recommend that you upgrade at the next available opportunity. **Bugfixes** * timescale#5180 Fix dist_cagg flaky test * timescale#5170 Fix CAgg on CAgg variable bucket size validation * timescale#5114 Fix issue with deleting data node and dropping database * timescale#5172 Remove parallel safe from partialize_agg * timescale#5162 Fix telemetry_stats test in PG15 * timescale#5133 Fix CAgg on CAgg different column order on the original hypertable * timescale#5152 Fix adding column with NULL constraint to compressed hypertable * timescale#5136 Fix SELECT from partial compressed chunks * timescale#5181 Fix ChunkAppend, ConstraintAwareAppend child subplan
This release contains bug fixes since the 2.9.1 release. We recommend that you upgrade at the next available opportunity. **Bugfixes** * timescale#5180 Fix dist_cagg flaky test * timescale#5170 Fix CAgg on CAgg variable bucket size validation * timescale#5114 Fix issue with deleting data node and dropping database * timescale#5172 Remove parallel safe from partialize_agg * timescale#5162 Fix telemetry_stats test in PG15 * timescale#5133 Fix CAgg on CAgg different column order on the original hypertable * timescale#5152 Fix adding column with NULL constraint to compressed hypertable * timescale#5136 Fix SELECT from partial compressed chunks * timescale#5181 Fix ChunkAppend, ConstraintAwareAppend child subplan * timescale#5193 Fix repartition behavior when attaching data node
Previous PR #4307 mark
partialize_agg
andfinalize_agg
as parallel safe but this change is leading to incorrect results in some cases.Those functions are supposed work in parallel but seems is not the case and it is not evident yet the root cause and how to properly use it in parallel queries so we decided to revert this change and provide correct results to users.
Fixes #4922