Skip to content
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

Fix segfault in cagg creation #5031

Merged
merged 1 commit into from Nov 28, 2022
Merged

Conversation

svenklemm
Copy link
Member

When trying to create cagg on top of any relation that is a neither a hypertable nor a continuous aggregate the command would segfault. This patch changes the code to handle this case gracefully and error out when trying to create a cagg on top of a relation that is not supported. Found by coverity.

@svenklemm svenklemm self-assigned this Nov 26, 2022
@svenklemm svenklemm added this to the TimescaleDB 2.9 milestone Nov 26, 2022
@codecov
Copy link

codecov bot commented Nov 26, 2022

Codecov Report

Merging #5031 (47e7741) into main (35c9120) will increase coverage by 0.06%.
The diff coverage is 90.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5031      +/-   ##
==========================================
+ Coverage   89.65%   89.72%   +0.06%     
==========================================
  Files         227      227              
  Lines       51600    51507      -93     
==========================================
- Hits        46264    46214      -50     
+ Misses       5336     5293      -43     
Impacted Files Coverage Δ
tsl/src/continuous_aggs/create.c 87.90% <90.00%> (-0.05%) ⬇️
src/loader/bgw_launcher.c 89.51% <0.00%> (-2.55%) ⬇️
src/bgw/scheduler.c 83.41% <0.00%> (-2.01%) ⬇️
src/loader/bgw_message_queue.c 88.63% <0.00%> (-0.57%) ⬇️
tsl/src/debug.c 49.36% <0.00%> (-0.33%) ⬇️
tsl/src/compression/api.c 95.57% <0.00%> (-0.25%) ⬇️
tsl/src/nodes/data_node_dispatch.c 93.03% <0.00%> (-0.22%) ⬇️
tsl/src/nodes/decompress_chunk/decompress_chunk.c 94.91% <0.00%> (-0.20%) ⬇️
tsl/test/src/test_ddl_hook.c 93.18% <0.00%> (-0.08%) ⬇️
src/cache.c 94.93% <0.00%> (-0.07%) ⬇️
... and 13 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 35c9120...47e7741. Read the comment docs.

When trying to create cagg on top of any relation that is a neither
a hypertable nor a continuous aggregate the command would segfault.
This patch changes the code to handle this case gracefully and error
out when trying to create a cagg on top of a relation that is not
supported. Found by coverity.
@svenklemm svenklemm enabled auto-merge (rebase) November 28, 2022 10:40
@svenklemm svenklemm merged commit 2d0087a into timescale:main Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants