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

feat: add version downgrade for live-migration FAQ #3163

Merged
merged 1 commit into from May 7, 2024

Conversation

Harkishen-Singh
Copy link
Member

Signed-off-by: Harkishen-Singh harkishensingh@hotmail.com

This commit adds a FAQ question that helps users to downgrade TimescaleDB version on their target database to match with the source database. This is useful when the source database (MST) does not have the TimescaleDB version that the target database is installed with.

Writing help

For information about style and word usage, see the style guide

Review checklists

Reviewers: use this section to ensure you have checked everything before approving this PR:

Subject matter expert (SME) review checklist

  • Is the content technically accurate?
  • Is the content complete?
  • Is the content presented in a logical order?
  • Does the content use appropriate names for features and products?
  • Does the content provide relevant links to further information?

Documentation team review checklist

  • Is the content free from typos?
  • Does the content use plain English?
  • Does the content contain clear sections for concepts, tasks, and references?
  • Have any images been uploaded to the correct location, and are resolvable?
  • If the page index was updated, are redirects required
    and have they been implemented?
  • Have you checked the built version of this content?

@Harkishen-Singh Harkishen-Singh requested a review from a team April 25, 2024 14:21
Copy link

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-hs-more-live-migration-faq

Comment on lines 22 to 55
## Source database does not have the latest TimescaleDB version

Live migration requires the TimescaleDB version in the source database to be the same as
that in the target database (Timescale Cloud). However, in certain instances, the TimescaleDB
version installed in the target database may differ from that available in the source
database, such as in the case of Managed Service for TimescaleDB. In such scenarios,
instead of upgrading the source database, an alternative approach is to downgrade the
TimescaleDB version in the target database to align it with the version available in
the source database.


This can be achieved by first uninstalling the TimescaleDB extension from the
target database using the following command:

```sql
DROP EXTENSION timescaledb;
```

Then, reinstall TimescaleDB extension with the desired version:

```sql
CREATE EXTENSION timescaledb VERSION '<version>';
```

<Highlight type="note">
You might need to reconnect `psql` with the `-X` flag to prevent reading the startup file.
</Highlight>

To determine which TimescaleDB versions are available on Timescale Cloud and can
be used for the downgrade, execute the following query:

```sql
SELECT version FROM pg_available_extension_versions WHERE name = 'timescaledb' ORDER BY 1 DESC;
```
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
## Source database does not have the latest TimescaleDB version
Live migration requires the TimescaleDB version in the source database to be the same as
that in the target database (Timescale Cloud). However, in certain instances, the TimescaleDB
version installed in the target database may differ from that available in the source
database, such as in the case of Managed Service for TimescaleDB. In such scenarios,
instead of upgrading the source database, an alternative approach is to downgrade the
TimescaleDB version in the target database to align it with the version available in
the source database.
This can be achieved by first uninstalling the TimescaleDB extension from the
target database using the following command:
```sql
DROP EXTENSION timescaledb;
```
Then, reinstall TimescaleDB extension with the desired version:
```sql
CREATE EXTENSION timescaledb VERSION '<version>';
```
<Highlight type="note">
You might need to reconnect `psql` with the `-X` flag to prevent reading the startup file.
</Highlight>
To determine which TimescaleDB versions are available on Timescale Cloud and can
be used for the downgrade, execute the following query:
```sql
SELECT version FROM pg_available_extension_versions WHERE name = 'timescaledb' ORDER BY 1 DESC;
```
## Source database is not running the latest version of TimescaleDB
When you migrate a [self-hosted][self hosted] or [Managed Service for TimescaleDB (MST)][mst]
database to Timescale, the source database and the destination
[Timescale Service][timescale-service] must run the same version of TimescaleDB.
Before you start [Live migration][live migration]:
<Procedure >
1. Check the version of TimescaleDB running on the source database and the
target Timescale Service:
```sql
\dx timescaledb
```
You see the following:
```sql
Name | Version | Schema | Description
-------------+---------+------------+---------------------------------------------------------------------
timescaledb | x.y.z | public | Enables scalable inserts and complex queries for time-series data
(1 row)
```
1. If the version of TimescaleDB on the source database is lower than your Timescale Service, either:
- **Downgrade**: reinstall an older version of TimescaleDB on your Timescale
Service that matches the source database:
1. Connect to your Timescale Service and check the versions of TimescaleDB available:
```sql
SELECT version FROM pg_available_extension_versions WHERE name = 'timescaledb' ORDER BY 1 DESC;
```
2. If an available TimescaleDB release matches your source database:
1. uninstall TimescaleDB from your Timescale Service:
```sql
DROP EXTENSION timescaledb;
```
1. Reinstall the correct version of TimescaleDB:
```sql
CREATE EXTENSION timescaledb VERSION '<version>';
```
<Highlight type="note">
To prevent reading the startup file, reconnect to your Timescale Service using `psql -X` .
</Highlight>
- **Upgrade**: for self-hosted databases,
[upgrade TimescaleDB][self hosted upgrade] to match your Timescale Service.
</ Procedure>
[live migration]: /migrate/:currentVersion:/live-migration/
[self hosted]: /self-hosted/:currentVersion:/
[self hosted upgrade]: /self-hosted/:currentVersion:/upgrades/
[mst]: /managed/:currentVersion:/
[timescale-service]: https://console.cloud.timescale.com/dashboard/services

Copy link
Member Author

Choose a reason for hiding this comment

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

@billy-the-fish thanks for the suggestions. I have implemented the changes.

Copy link
Contributor

@billy-the-fish billy-the-fish left a comment

Choose a reason for hiding this comment

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

Hi, hope you are ok with the changes I propose.

Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>

This commit adds a FAQ question that helps users to downgrade
TimescaleDB version on their target database to match with the
source database. This is useful when the source database (MST) does not
have the TimescaleDB version that the target database is installed
with.
Copy link
Contributor

@billy-the-fish billy-the-fish left a comment

Choose a reason for hiding this comment

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

LGTM

@billy-the-fish billy-the-fish merged commit fbf501e into latest May 7, 2024
3 checks passed
@billy-the-fish billy-the-fish deleted the hs/more-live-migration-faq branch May 7, 2024 10:08
billy-the-fish pushed a commit that referenced this pull request May 10, 2024
Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>

This commit adds a FAQ question that helps users to downgrade
TimescaleDB version on their target database to match with the
source database. This is useful when the source database (MST) does not
have the TimescaleDB version that the target database is installed
with.
billy-the-fish added a commit that referenced this pull request May 10, 2024
* Merging up stubs into main documents, editing, formatting

* Oops typo

* Update for linter

Signed-off-by: Iain Cox <iain.cox@sarkdocumentation.com>

* Update administration.md

Signed-off-by: Iain Cox <iain.cox@sarkdocumentation.com>

* fix: update navigation and links for page merge.

* fix: clean up de-chunking.

* fix: clean up de-chunking.

* feat: unite stubs.

* feat: unite stubs.

* Fix typo (#3052)

Signed-off-by: Florian Mt <fmonfort@enssat.fr>
Co-authored-by: Iain Cox <iain.cox@sarkdocumentation.com>

* Fix typo in troubleshooting section (#3073)

* Update live-migration to v0.0.9 (#3071)

Co-authored-by: Iain Cox <iain.cox@sarkdocumentation.com>

* Copy Nit (#3078)

Signed-off-by: Austin Lai <76412946+alai97@users.noreply.github.com>

* Update import-csv.md (#3080)

Make time column references consistent

Signed-off-by: Solar Olugebefola <12288273+solugebefola@users.noreply.github.com>

* Update new about compression (#3012)

* live-migration: Add docs changes for v0.0.10 (#3091)

Signed-off-by: Arunprasad Rajkumar <ar.arunprasad@gmail.com>

* Add Google CA (#3090)

We've added a new CA provider to our cloud, reflecting this fact in the
docs.

* Update ruby.md (#3065)

* Update ruby.md 

Modify references to Timescale/TimescaleDB/Timescale Cloud

Signed-off-by: Solar Olugebefola <12288273+solugebefola@users.noreply.github.com>

* fix: update TOC links to match headings.

* fix: update TOC links to match headings.

* fix: correct product name.

---------

Signed-off-by: Solar Olugebefola <12288273+solugebefola@users.noreply.github.com>
Co-authored-by: Iain Cox <iain.cox@sarkdocumentation.com>

* live-migration: Add docs changes for v0.0.11 (#3096)

Signed-off-by: Arunprasad Rajkumar <ar.arunprasad@gmail.com>

* Move multinode migration under playbooks (#3110)

* 3113 docs rfc add new editor (#3115)

* First draft

* Complete article, add images

* Add a screenshot of PopSQL

* Update popsql_button_in_console

Highlighted the button

* Wrap text

* feat: update PopSQL page, get started and update sections with PopSQL information.

* feat: link to images on S3.

* fix: language cleanup.

* Apply suggestions from code review

Co-authored-by: sremertimescale <165809978+sremertimescale@users.noreply.github.com>
Signed-off-by: Iain Cox <iain.cox@sarkdocumentation.com>

* fix: language cleanup after review.

* fix: another language review.

* fix: updates following review by Ramon.

* Update use-timescale/popsql.md

Co-authored-by: Ramon Guiu <ramon@timescale.com>
Signed-off-by: Iain Cox <iain.cox@sarkdocumentation.com>

* Update use-timescale/query-data/about-query-data.md

Co-authored-by: Ramon Guiu <ramon@timescale.com>
Signed-off-by: Iain Cox <iain.cox@sarkdocumentation.com>

* fix: add contact information to add more seats.

---------

Signed-off-by: Iain Cox <iain.cox@sarkdocumentation.com>
Co-authored-by: Rahil Sondhi <rahilsondhi@gmail.com>
Co-authored-by: sremertimescale <165809978+sremertimescale@users.noreply.github.com>
Co-authored-by: Ramon Guiu <ramon@timescale.com>

* fix: numbering and full stop. (#3120)

* missing word in add_reorder_policy (#3106)

Signed-off-by: Sam Debruyn <sam@debruyn.dev>
Co-authored-by: Iain Cox <iain.cox@sarkdocumentation.com>

* Restrict usage of time_bucket_ng in CAggs (#3112)

The function time_bucket_ng is deprecated and should not be used in new
CAggs. 2.15.0 will also block the usage of this function.

* fix: broken links. (#3123)

* fix: broken links.

* fix: broken links.

* Update CAgg add_continuous_aggregate_policy documentation (#3128)

* fix: deprecate distributed hypertables from the API reference. (#3134)

* fix: update API reference for set_integer_now_func. (#3135)

* fix: update API reference for set_integer_now_func.

Co-authored-by: Jônatas Davi Paganini <jonatas@timescale.com>
Signed-off-by: Iain Cox <iain@timescale.com>

* Add compression settings information views (#3142)

* fix: using the public API to check the  chunk time interval for a hypertable. (#3141)

* 3144 docs rfc be more clear about tiered storage being on timescale not on self hosted (#3145)

* feat: update tiered storage overview

* feat: update tiered storage overview

* Update alter_job.md (#3103)

Added missing information in alter_job options

Signed-off-by: Fabrízio de Royes Mello <fabriziomello@gmail.com>
Co-authored-by: Iain Cox <iain@timescale.com>

* fix: some broken links. A couple of text updates. (#3151)

* feat: FAQ for live migration (#3139)

Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>

* chore: update live-migration to v0.0.13 (#3150)

Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>

* Add pgstattuple to list of available extensions (#3154)

* fix: clarify that each service hosts a single service only. (#3161)

* fix: change link in Migrate the entire database at once to the live migration page. (#3159)

* Add warning about SERIAL types and dual-write (#3162)

* Address possible installation issues regarding psycopg2 (#3165)

* Address possible installation issues regarding psycopg2

* Address possible installation issues regarding psycopg2

* chore: few language updates for the install procedure.

---------

Co-authored-by: billy-the-fish <iain.cox@sarkdocumentation.com>

* Add troubleshooting note about partial continuous aggregates (#3164)


Signed-off-by: James Guthrie <JamesGuthrie@users.noreply.github.com>
Co-authored-by: billy-the-fish <iain.cox@sarkdocumentation.com>

* 2829 obsolete restriction on replication factor 1 still in the docs 1 (#3129)

* fix: update create_distributed_hypertable

* Recommend live-migration instead of dual-writes (#3173)

* Refer to live-migration 0.0.14 (#3179)

Signed-off-by: Arunprasad Rajkumar <ar.arunprasad@gmail.com>

* feat: add version downgrade for live-migration FAQ (#3163)

Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>

This commit adds a FAQ question that helps users to downgrade
TimescaleDB version on their target database to match with the
source database. This is useful when the source database (MST) does not
have the TimescaleDB version that the target database is installed
with.

* Make some changes to refresh cagg note (#3146)

* Make some changes to refresh cagg note

This fixes one typo and changes a few other words.

Signed-off-by: RobAtticus <rob@timescale.com>

* chore: updates after review.

---------

Signed-off-by: RobAtticus <rob@timescale.com>
Co-authored-by: Iain <iain@timescale.com>

* Add role based auth to CloudWatch exporter doc (#3156)

* Add role based auth to CloudWatch exporter doc

Role based authentication is added for CloudWatch exporter that allows
to authenticate with users' AWS accounts and we need to document
configuration that needs to be done on the user side to make it work.

* add provider URLs and role example

* Clarify what the URL serves for

* chore: first go updating the configuration procedure.

* chore: updates after first review.

* chore: updates after first review.

* Update use-timescale/metrics-logging/integrations.md

Nice.

Co-authored-by: Danil Zhigalin <danil@timescale.com>
Signed-off-by: Iain Cox <iain@timescale.com>

* fix: update metatags for MDX.

* Replace trust policy to a role

AWS docs refer to this as a role. Make sure we are talking about the
same thing in our docs.

* Update use-timescale/metrics-logging/integrations.md

Co-authored-by: Nicolas Nosenzo <niconosenzo@gmail.com>
Signed-off-by: Iain Cox <iain@timescale.com>

---------

Signed-off-by: Iain Cox <iain@timescale.com>
Co-authored-by: niconosenzo <niconosenzo@gmail.com>
Co-authored-by: billy-the-fish <iain.cox@sarkdocumentation.com>
Co-authored-by: Iain Cox <iain@timescale.com>

* fix: document actual behavior of add_continuous_aggregate_policy when using if_not_exists (#3037)

Signed-off-by: dtext <textores.danny@gmail.com>
Co-authored-by: Iain Cox <iain@timescale.com>

* fix: add verb to sentence. (#3131)

* fix: add verb to sentence.
* fix: update after review.

* fix: update navigation and links for page merge.

* fix: clean up de-chunking.

* chore: migrate changes in future versions back to this PR.

* fix: my fatal weakness.

* fix: one broken link fixed.

* fix: more link fixing after manual check.

---------

Signed-off-by: Iain Cox <iain.cox@sarkdocumentation.com>
Signed-off-by: Florian Mt <fmonfort@enssat.fr>
Signed-off-by: Austin Lai <76412946+alai97@users.noreply.github.com>
Signed-off-by: Solar Olugebefola <12288273+solugebefola@users.noreply.github.com>
Signed-off-by: Arunprasad Rajkumar <ar.arunprasad@gmail.com>
Signed-off-by: Sam Debruyn <sam@debruyn.dev>
Signed-off-by: Iain Cox <iain@timescale.com>
Signed-off-by: Fabrízio de Royes Mello <fabriziomello@gmail.com>
Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>
Signed-off-by: James Guthrie <JamesGuthrie@users.noreply.github.com>
Signed-off-by: RobAtticus <rob@timescale.com>
Signed-off-by: dtext <textores.danny@gmail.com>
Co-authored-by: Jay Allen <44067410+gaiaslastlaugh@users.noreply.github.com>
Co-authored-by: James Sewell <james.sewell@gmail.com>
Co-authored-by: Florian Mt <fmonfort@enssat.fr>
Co-authored-by: Ante Kresic <antekresic@users.noreply.github.com>
Co-authored-by: James Guthrie <JamesGuthrie@users.noreply.github.com>
Co-authored-by: Austin Lai <76412946+alai97@users.noreply.github.com>
Co-authored-by: Solar Olugebefola <12288273+solugebefola@users.noreply.github.com>
Co-authored-by: Arunprasad Rajkumar <ar.arunprasad@gmail.com>
Co-authored-by: Danil Zhigalin <danil@timescale.com>
Co-authored-by: Konstantinos Gkiokas <giokostis@gmail.com>
Co-authored-by: Rahil Sondhi <rahilsondhi@gmail.com>
Co-authored-by: sremertimescale <165809978+sremertimescale@users.noreply.github.com>
Co-authored-by: Ramon Guiu <ramon@timescale.com>
Co-authored-by: Sam Debruyn <sam@debruyn.dev>
Co-authored-by: Jan Nidzwetzki <jan@timescale.com>
Co-authored-by: Jônatas Davi Paganini <jonatas@timescale.com>
Co-authored-by: Fabrízio de Royes Mello <fabriziomello@gmail.com>
Co-authored-by: Harkishen Singh <harkishensingh@hotmail.com>
Co-authored-by: John Pruitt <jgpruitt@gmail.com>
Co-authored-by: alejandrodnm <alejandrodnm@gmail.com>
Co-authored-by: RobAtticus <rob@timescale.com>
Co-authored-by: niconosenzo <niconosenzo@gmail.com>
Co-authored-by: dtext <textores.danny@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants