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
Add function to drop the osm chunk #6801
base: main
Are you sure you want to change the base?
Conversation
291efba
to
7bb9c87
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6801 +/- ##
==========================================
+ Coverage 80.06% 80.73% +0.66%
==========================================
Files 190 194 +4
Lines 37181 36775 -406
Branches 9450 9639 +189
==========================================
- Hits 29770 29691 -79
- Misses 2997 3174 +177
+ Partials 4414 3910 -504 ☔ View full report in Codecov by Sentry. |
ff2896d
to
233a516
Compare
/* do not drop any chunk dependencies */ | ||
ts_chunk_drop(ch, DROP_RESTRICT, LOG); | ||
/* reset hypertable OSM status */ | ||
ht->fd.status = HYPERTABLE_STATUS_DEFAULT; |
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.
should this be done via hypertable_update_status_osm call instead of ts_hypertable_update()?
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.
yes, using hypertable_update_status_osm
would probably be a better option as it takes the proper locks for updating the timescaledb_catalog.hypertable
row
233a516
to
f49f2e9
Compare
f49f2e9
to
fc86ea0
Compare
CREATE OR REPLACE FUNCTION _timescaledb_functions.drop_osm_table_chunk( | ||
hypertable REGCLASS, | ||
chunk REGCLASS) | ||
RETURNS BOOL AS '@MODULE_PATHNAME@', 'ts_chunk_drop_osm_table_chunk' LANGUAGE C VOLATILE; |
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.
Why not pass only the chunk regclass to this API??
requires PR 6815