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

[Bug]: Cannot merge two chunks when their time ranges have a gap #7801

Open
pantonis opened this issue Mar 8, 2025 · 5 comments
Open

[Bug]: Cannot merge two chunks when their time ranges have a gap #7801

pantonis opened this issue Mar 8, 2025 · 5 comments

Comments

@pantonis
Copy link

pantonis commented Mar 8, 2025

What type of bug is this?

Other

What subsystems and features are affected?

Other

What happened?

I have two chunks with range start, range end. Hypertable range interval is set to 180 days

range_start	range_end
24/04/2017 03:00:00.000000 +03:00 	21/10/2017 03:00:00.000000 +03:00 
29/04/2016 03:00:00.000000 +03:00 	26/10/2016 03:00:00.000000 +03:00

When I try to merge them I get

cannot create new chunk partition boundaries

TimescaleDB version affected

2.18.2

PostgreSQL version used

16.8

What operating system did you use?

Ubuntu 24.04.1

What installation method did you use?

Deb/Apt

What platform did you run on?

On prem/Self-hosted

Relevant log output and stack trace

How can we reproduce the bug?

N/A
@pantonis pantonis added the bug label Mar 8, 2025
@antekresic
Copy link
Contributor

This is a known limitation. Can you create the chunks that are in the gap? They can be empty and then you can merge them all together.

@pantonis
Copy link
Author

pantonis commented Mar 8, 2025

How can you create chunks?

@antekresic
Copy link
Contributor

One workaround I know of is to insert a single tuple in that time range and then immediately delete it, you will have the chunk created without any data in it.

That's the only way I'm aware of.

@pantonis
Copy link
Author

pantonis commented Mar 9, 2025

Although it might work, not a clean solution I think. Since merging of compressed chunks is coming to 2.19, I think this issue need to be resolved properly. This is the purpose of the issue opened after talking with Freedman

@antekresic
Copy link
Contributor

I agree, that's why I said its a known limitation. Can't speak for the plans on improvements but it should be fixed in the future (since we are aware of it).

Just offering you a workaround while the improvement comes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants