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
Improve cagg query chunk exclusion #5824
Conversation
@erimatnor, @pmwkaa: please review this pull request.
|
41eb08b
to
fa19596
Compare
ce8dcce
to
61e8805
Compare
Codecov Report
@@ Coverage Diff @@
## main #5824 +/- ##
==========================================
- Coverage 87.87% 87.11% -0.77%
==========================================
Files 239 239
Lines 55698 55311 -387
Branches 12335 12209 -126
==========================================
- Hits 48945 48183 -762
+ Misses 4887 4831 -56
- Partials 1866 2297 +431
... and 105 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
ff12444
to
92dc54d
Compare
92dc54d
to
4bb126b
Compare
4bb126b
to
9926462
Compare
5e8ea99
to
ef1cb9a
Compare
This release contains bug fixes since the 2.11.0 release. We recommend that you upgrade at the next available opportunity. **Features** * timescale#5679 Teach loader to load OSM extension **Bugfixes** * timescale#5705 Scheduler accidentally getting killed when calling `delete_job` * timescale#5742 Fix Result node handling with ConstraintAwareAppend on compressed chunks * timescale#5750 Ensure tlist is present in decompress chunk plan * timescale#5754 Fixed handling of NULL values in bookend_sfunc * timescale#5798 Fixed batch look ahead in compressed sorted merge * timescale#5804 Mark cagg_watermark function as PARALLEL RESTRICTED * timescale#5807 Copy job config JSONB structure into current MemoryContext * timescale#5824 Improve continuous aggregate query chunk exclusion **Thanks** * @JamieD9 for reporting an issue with a wrong result ordering * @xvaara for reporting an issue with Result node handling in ConstraintAwareAppend
This patch changes the time_bucket exclusion in cagg queries to distinguish between < and <=. Previously those were treated the same leading to failure to exclude chunks when the constraints where exactly at the bucket boundary.
ef1cb9a
to
f216302
Compare
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.
Approving, but I still have a concern about that inclusive check; see inline comment.
return TimestampTzGetDatum(value); | ||
} | ||
|
||
elog(ERROR, "unsupported datatype in int_get_datum: %s", format_type_be(type)); |
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.
Still not sure why we have this error since it is impossible to reach here given the type check already outside this function. Also codecov is complaining. pg_unreachable()
should be sufficient.
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.
This is a bit of a grey area. Code gets refactored all the time and conditions that are true now might not be later. I prefer to have an error here over just pg_unreachable because an error will only affect the session hitting this while pg_unreachable will kill all sessions and have postgres go into recovery.
This release contains bug fixes since the 2.11.0 release. We recommend that you upgrade at the next available opportunity. **Features** * #5679 Teach loader to load OSM extension **Bugfixes** * #5705 Scheduler accidentally getting killed when calling `delete_job` * #5742 Fix Result node handling with ConstraintAwareAppend on compressed chunks * #5750 Ensure tlist is present in decompress chunk plan * #5754 Fixed handling of NULL values in bookend_sfunc * #5798 Fixed batch look ahead in compressed sorted merge * #5804 Mark cagg_watermark function as PARALLEL RESTRICTED * #5807 Copy job config JSONB structure into current MemoryContext * #5824 Improve continuous aggregate query chunk exclusion **Thanks** * @JamieD9 for reporting an issue with a wrong result ordering * @xvaara for reporting an issue with Result node handling in ConstraintAwareAppend
This release contains bug fixes since the 2.11.0 release. We recommend that you upgrade at the next available opportunity. **Features** * timescale#5679 Teach loader to load OSM extension **Bugfixes** * timescale#5705 Scheduler accidentally getting killed when calling `delete_job` * timescale#5742 Fix Result node handling with ConstraintAwareAppend on compressed chunks * timescale#5750 Ensure tlist is present in decompress chunk plan * timescale#5754 Fixed handling of NULL values in bookend_sfunc * timescale#5798 Fixed batch look ahead in compressed sorted merge * timescale#5804 Mark cagg_watermark function as PARALLEL RESTRICTED * timescale#5807 Copy job config JSONB structure into current MemoryContext * timescale#5824 Improve continuous aggregate query chunk exclusion **Thanks** * @JamieD9 for reporting an issue with a wrong result ordering * @xvaara for reporting an issue with Result node handling in ConstraintAwareAppend
This release contains bug fixes since the 2.11.0 release. We recommend that you upgrade at the next available opportunity. **Features** * #5679 Teach loader to load OSM extension **Bugfixes** * #5705 Scheduler accidentally getting killed when calling `delete_job` * #5742 Fix Result node handling with ConstraintAwareAppend on compressed chunks * #5750 Ensure tlist is present in decompress chunk plan * #5754 Fixed handling of NULL values in bookend_sfunc * #5798 Fixed batch look ahead in compressed sorted merge * #5804 Mark cagg_watermark function as PARALLEL RESTRICTED * #5807 Copy job config JSONB structure into current MemoryContext * #5824 Improve continuous aggregate query chunk exclusion **Thanks** * @JamieD9 for reporting an issue with a wrong result ordering * @xvaara for reporting an issue with Result node handling in ConstraintAwareAppend
This release contains bug fixes since the 2.11.0 release. We recommend that you upgrade at the next available opportunity. **Features** * #5679 Teach loader to load OSM extension **Bugfixes** * #5705 Scheduler accidentally getting killed when calling `delete_job` * #5742 Fix Result node handling with ConstraintAwareAppend on compressed chunks * #5750 Ensure tlist is present in decompress chunk plan * #5754 Fixed handling of NULL values in bookend_sfunc * #5798 Fixed batch look ahead in compressed sorted merge * #5804 Mark cagg_watermark function as PARALLEL RESTRICTED * #5807 Copy job config JSONB structure into current MemoryContext * #5824 Improve continuous aggregate query chunk exclusion **Thanks** * @JamieD9 for reporting an issue with a wrong result ordering * @xvaara for reporting an issue with Result node handling in ConstraintAwareAppend
This patch changes the time_bucket exclusion in cagg queries to distinguish between < and <=. Previously those were treated the same leading to failure to exclude chunks when the constraints where exactly at the bucket boundary.