Skip to content

Conversation

timescale-automation
Copy link
Member

This is an automated backport of #7766: Load OSM extension in retention background worker to drop tiered chunks.
This PR will be merged automatically after all the relevant CI checks pass. If this fix should not be backported, or will be backported manually, just close this PR. You can use the backport branch to add your changes, it won't be modified automatically anymore.

For more details, please see the documentation

Original description

Load OSM extension in retention background worker to drop tiered chunks

OSM sets a special callback for dropping tiered chunks that is used by timescaledb in ts_chunk_do_drop_chunks. But in background worker OSM library doesn't get loaded and retention policy ends up not removing tiered chunks.

Disable-check: approval-count
(for some reason Gayathri's approval did not count)

The OSM library doesn't get loaded when a retention policy runs from
a background worker. This patch ensures that the library gets loaded by
calling `GetFdwRoutineByRelId()` on the OSM chunk.

(cherry picked from commit c3559d4)
Copy link

codecov bot commented Sep 17, 2025

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.46%. Comparing base (fc2754e) to head (17d86db).
⚠️ Report is 1 commits behind head on 2.22.x.

Files with missing lines Patch % Lines
src/chunk.c 33.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           2.22.x    #8639      +/-   ##
==========================================
+ Coverage   82.37%   82.46%   +0.08%     
==========================================
  Files         248      248              
  Lines       47650    47624      -26     
  Branches    12109    12106       -3     
==========================================
+ Hits        39253    39273      +20     
- Misses       3507     3518      +11     
+ Partials     4890     4833      -57     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@timescale-automation timescale-automation merged commit 8b1ae49 into 2.22.x Sep 17, 2025
43 of 44 checks passed
@timescale-automation timescale-automation deleted the backport/2.22.x/7766 branch September 17, 2025 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is-auto-backport PR created by backport automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants