-
Notifications
You must be signed in to change notification settings - Fork 96
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 documentation for disable_tiering #3496
Conversation
Allow 10 minutes from last push for the staging site to build. If the link doesn't work, try using incognito mode instead. For internal reviewers, check web-documentation repo actions for staging build status. Link to build for this PR: http://docs-dev.timescale.com/docs-upd2 |
bd698e5
to
e8f9902
Compare
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.
Thank you @gayyappan, added a few comments
title: Creating a tiering policy | ||
excerpt: How to create a tiering policy |
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.
title: Creating a tiering policy | |
excerpt: How to create a tiering policy | |
title: Disabling tiering for a hypertable | |
excerpt: How to disable tiering for a hypertable |
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.
Disable tiering for a hypertable
No ing words please :-).
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.
fixed.
In order to use this API, first call [remove_tiering_policy][tiering-policy] to drop | ||
any tiering policy associated with this hypertable. Second, make sure that there is | ||
no tiered data associated with this hypertable. | ||
|
||
This query lists the tiered chunks associated with this hypertable. | ||
```sql | ||
select * from timescaledb_osm.tiered_chunks | ||
``` | ||
|
||
If you have any tiered chunks, you must either untier this data or drop these chunks |
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.
@gayyappan you may want to disable tiering on a service but leave the tiered data - for example, if there is another service (fork, etc) that has access to the same data. Am I right?
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.
This is metadata specific to this service/instance. It does not control what happens on a fork.
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.
@gayyappan what I meant was that they do not need to make sure that they untier everything - their data is still there if at least another service has a reference to them.
Or is it that if they don't do so their catalog will be broken and hence we require them to manually drop the chunk for this service?
If so, we should make this more clear. Both that (1) as long as there is another service with access to the same tiered data they do not lose the data and that (2) they need to do something with those chunks before disabling tiering.
Otherwise, the way it is written now it feels like the primary reason to do so is to keep the data.
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.
We added this API in response to users who want to untier everything and then make some schema modifications. We had to manually go and fix everything to remove tiering capabilities for that hypertable - drop the foreign table etc.
Or they still foreign chunks in their plans etc.
Probably needs a rewrite if this is confusing. Please take a stab at it.
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.
IMO, Bringing up another service in this context is confusing. A fork always respects a fork's semantics (i.e. the primary and fork will/can diverge).
a replica respects a replica's semantics i.e. primary and replica will be in sync.
So this is not related to tiering?
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.
I made some changes to the doc. Hopefully this reads better now. @billy-the-fish @iroussos all yours now :-)
from tiered storage. You can use the [untier_chunk][untier-data] procedure | ||
to untier chunks that have already been tiered to local storage. | ||
|
||
If these two preconditions are met, you can use the disable_tiering function to drop all tiering related metadata for the hypertable. |
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.
-you can use the disable_tiering function
+you can use the `disable_tiering` function
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.
fixed.
This query lists the tiered chunks associated with this hypertable. | ||
```sql | ||
select * from timescaledb_osm.tiered_chunks | ||
``` |
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.
I checked a few doc pages, example queries are usually ended by ;
(surprisingly not all though, but most).
Also technically this query shows all tiered chunks, not just "associated with this hypertable". I wonder if this should be rephrased somehow or the query adjusted.
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.
fixed.
Really cool doc. How about we combine https://docs-dev.timescale.com/docs-upd2/use-timescale/upd2/data-tiering/enabling-data-tiering/, https://docs-dev.timescale.com/docs-upd2/use-timescale/upd2/data-tiering/creating-data-tiering-policy/ and this doc into one page called Manage data tiering or some such like? If you are ok with the idea i will bash this together for you. |
Sounds like a great idea @billy-the-fish! Let's go for it :-) |
Cool. I will have a bash tomorrow or monday |
Yes, I am happy to have you take over this PR and get the doc changes in. |
Co-authored-by: Yannis Roussos <iroussos@gmail.com> Signed-off-by: Iain Cox <iain@timescale.com>
Documentation for disable_tiering API