Skip to content

Propagate vacuum to compressed relation when running on chunk - #10288

Merged
svenklemm merged 1 commit into
mainfrom
sven/compressed_vacuum
Jul 23, 2026
Merged

Propagate vacuum to compressed relation when running on chunk#10288
svenklemm merged 1 commit into
mainfrom
sven/compressed_vacuum

Conversation

@svenklemm

@svenklemm svenklemm commented Jul 17, 2026

Copy link
Copy Markdown
Member

When VACUUM or ANALYZE was run on a single chunk the compressed
relation belonging to that chunk was not processed. Add the
compressed relation to the list of relations to vacuum when the
target is a compressed chunk.

Fixes: #10286

@github-actions

Copy link
Copy Markdown

@melihmutlu, @dbeck: please review this pull request.

Powered by pull-review

@svenklemm svenklemm changed the title Vacuum compressed relation for direct chunk vacuum Propagate vacuum to compressed relation when running on chunk Jul 17, 2026
When VACUUM or ANALYZE was run on a single chunk the compressed
relation belonging to that chunk was not processed. Add the
compressed relation to the list of relations to vacuum when the
target is a compressed chunk.
@svenklemm
svenklemm force-pushed the sven/compressed_vacuum branch from 0941298 to a111b4c Compare July 17, 2026 14:07
@svenklemm svenklemm added this to the v2.29.0 milestone Jul 17, 2026
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/process_utility.c 87.50% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

Comment thread src/process_utility.c
if (chunk && ts_chunk_is_compressed(chunk))
{
Oid compressed_relid = ts_relation_get_compressed_relid(chunk->fd.relid);
/* Compressed chunk might be missing due to concurrent operations */

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean we also need to lock the relation itself?

@akuzm akuzm Jul 17, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lookup apparently locks the settings tuple, but I'm not sure if the lock is kept or if it's sufficient, and the "rebuild if needed" uses NoLock.

@svenklemm svenklemm added the force-auto-backport Automatically backport this PR or fix of this issue, even if it's not marked as "bug" label Jul 23, 2026
@svenklemm
svenklemm merged commit 5252684 into main Jul 23, 2026
77 of 82 checks passed
@svenklemm
svenklemm deleted the sven/compressed_vacuum branch July 23, 2026 05:52
@timescale-automation timescale-automation added the released-2.29.0 Released in 2.29.0 label Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backported-2.29.x force-auto-backport Automatically backport this PR or fix of this issue, even if it's not marked as "bug" manual-backport released-2.29.0 Released in 2.29.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: problem with reclaim disk space

5 participants