forked from github/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Move Updating How To to new template (github#1242)" (github#1273
) This reverts commit 0e17abb.
- Loading branch information
Showing
17 changed files
with
756 additions
and
634 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
timescaledb/how-to-guides/update-timescaledb/downgrade-timescaledb.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Downgrade TimescaleDB versions | ||
If you upgrade your TimescaleDB version and encounter problems, you can | ||
immediately roll back your upgrade. To downgrade to your previous version, | ||
connect to your database and run: | ||
```sql | ||
ALTER EXTENSION timescaledb UPDATE TO '<PREVIOUS_VERSION>'; | ||
``` | ||
|
||
For example: | ||
```sql | ||
ALTER EXTENSION timescaledb UPDATE TO '2.5.1'; | ||
``` | ||
|
||
<highlight type="important"> | ||
If you're connecting to your database with `psql`, | ||
connect with the `-X` flag. This prevents any commands in `.psqlrc` from loading | ||
another TimescaleDB version. | ||
</highlight> | ||
|
||
You can verify that the downgrade worked by running `\dx timescaledb` to see the | ||
version number of the extension. | ||
|
||
## Limitations | ||
Downgrading might not be supported for all versions. Where possible, downgrades | ||
between patch versions and between consecutive minor versions are supported. For | ||
example, you can downgrade from TimescaleDB 2.5.2 to 2.5.1, or from 2.5.0 to | ||
2.4.2. However, some versions might not support downgrading. To check whether | ||
you can downgrade from a specific version, see the [release | ||
notes](https://docs.timescale.com/timescaledb/latest/overview/release-notes/). | ||
|
||
Where supported, the downgrade script is tested for a single-step downgrade from | ||
the current version to the previous version. Multi-step downgrades may work but | ||
have not been tested. Downgrading might not work if you make changes to your | ||
database between upgrading and downgrading. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
# Update TimescaleDB versions | ||
|
||
Update your TimescaleDB version with an in-place update. By updating in-place, | ||
you don't need to dump and restore your data. Automated migration scripts handle | ||
conversion of internal states where needed. | ||
|
||
<highlight type="cloud" header="Make upgrades automatic" button="Try Timescale Cloud for free"> | ||
Timescale Cloud avoids the manual work involved in updating your TimescaleDB version. | ||
Updates take place automatically during a maintenance window picked by you. | ||
[Learn more](https://docs.timescale.com/cloud/latest/service-operations/maintenance/) | ||
about automatic version updates in Timescale Cloud. | ||
</highlight> | ||
|
||
<highlight type="important"> | ||
Follow these instructions to update TimescaleDB within the same major release | ||
version. For example, you can update from TimescaleDB 2.1 to 2.2, or from 1.7 to | ||
1.7.4. To update from 1.x to 2.x, see the [section on updating to TimescaleDB | ||
2.x](https://docs.timescale.com/timescaledb/latest/how-to-guides/update-timescaledb/update-timescaledb-2/). | ||
</highlight> | ||
|
||
## TimescaleDB release compatibility | ||
|
||
TimescaleDB supports the following PostgreSQL releases. If you aren't running a | ||
compatible release, update PostgreSQL before updating TimescaleDB. To learn | ||
more, see the sections on updating PostgreSQL in | ||
[Timescale Cloud][cloud-update-pg], | ||
[Managed Service for TimescaleDB][mst-update-pg], and | ||
[self-hosted TimescaleDB][self-hosted-update-pg]. | ||
|
||
| TimescaleDB release | Supported PostgreSQL releases | | ||
| ------------------- | ----------------------------- | | ||
| 1.7 | 9.6, 10, 11, 12 | | ||
| 2.0 | 11, 12 | | ||
| 2.1-2.3 | 11, 12, 13 | | ||
| 2.4 | 12, 13 | | ||
| 2.5+ | 12, 13, 14 | | ||
|
||
<highlight type="important"> | ||
To make sure your update completes properly, update PostgreSQL and TimescaleDB | ||
separately. Keep PostgreSQL and TimescaleDB versions compatible throughout the | ||
process. If your update spans multiple versions, this could require several steps. | ||
|
||
For example, if you're currently running PostgreSQL 10 and TimescaleDB 1.7.5, | ||
and you want to update to PostgreSQL 13 and TimescaleDB 2.2: | ||
|
||
1. Upgrade PostgreSQL 10 to PostgreSQL 12 | ||
1. Update TimescaleDB 1.7.5 to TimescaleDB 2.2 on PostgreSQL 12 | ||
1. Upgrade PostgreSQL 12 to PostgreSQL 13 with TimescaleDB 2.2 installed | ||
|
||
</highlight> | ||
|
||
## Update TimescaleDB | ||
|
||
Update TimescaleDB by using PostgreSQL's `ALTER EXTENSION` command. You can run | ||
different TimescaleDB versions on different databases within the same PostgreSQL | ||
instance. You can also update your extensions independently on different | ||
databases. | ||
|
||
<highlight type="important"> | ||
Before updating, check the [release | ||
notes](https://docs.timescale.com/timescaledb/latest/overview/release-notes/) | ||
for the version you want to update to. Specific versions might have different | ||
update requirements that add additional steps. | ||
</highlight> | ||
|
||
<procedure> | ||
|
||
### Updating TimescaleDB | ||
|
||
1. [Back up][backup] your database with [`pg_dump`][pg_dump]. | ||
1. [Install][install] the latest version of the TimescaleDB extension. | ||
1. Connect to your database with a PostgreSQL client. This example uses `psql`, | ||
but any client works. If you're using `psql`, connect with the `-X` flag. | ||
This prevents any commands in `.psqlrc` from loading a previous TimescaleDB | ||
version on session startup. | ||
```bash | ||
psql -X "postgres://<USERNAME>:<PASSWORD>@<HOST>:<PORT>/<DB_NAME>?sslmode=require" | ||
``` | ||
Do not run any other commands before continuing to the next step. | ||
1. At the `psql` prompt, upgrade TimescaleDB to the latest installed version: | ||
```sql | ||
ALTER EXTENSION timescaledb UPDATE; | ||
``` | ||
This upgrades TimescaleDB to the latest installed version, even if you're | ||
several versions behind. To update to a version that's not the latest | ||
installed version, specify the version number, like this: | ||
```sql | ||
ALTER EXTENSION timescaledb UPDATE TO '2.5.1'; | ||
``` | ||
1. Verify that the upgrade worked by running `\dx timescaledb` to see the | ||
version number of the extension. | ||
|
||
```sql | ||
\dx timescaledb | ||
Name | Version | Schema | Description | ||
------------+---------+------------+--------------------------------------------------------------------- | ||
timescaledb | x.y.z | public | Enables scalable inserts and complex queries for time-series data | ||
(1 row) | ||
``` | ||
|
||
</procedure> | ||
|
||
## Downgrade TimescaleDB | ||
|
||
If you encounter a problem immediately after upgrading, you can roll back your | ||
upgrade. To learn more, see the [section on downgrading TimescaleDB][downgrade]. | ||
|
||
[backup]: /how-to-guides/backup-and-restore/ | ||
[changes-in-2.0]: /overview/release-notes/changes-in-timescaledb-2/ | ||
[cloud-update-pg]: cloud/:currentVersion:/maintenance/#upgrade-to-a-new-postgresql-version | ||
[downgrade]: /how-to-guides/update-timescaledb/downgrade-timescaledb/ | ||
[install]: /install/:currentVersion:/ | ||
[mst-update-pg]: https://kb-managed.timescale.com/en/articles/5368016-perform-a-postgresql-major-version-upgrade | ||
[pg_dump]: https://www.postgresql.org/docs/current/app-pgdump.html | ||
[pg_upgrade]: https://www.postgresql.org/docs/current/static/pgupgrade.html | ||
[self-hosted-update-pg]: /timescaledb/:currentVersion:/how-to-guides/update-timescaledb/upgrade-postgresql/ | ||
[telemetry]: /administration/telemetry/ | ||
[update-docker]: /how-to-guides/update-timescaledb/updating-docker/ | ||
[update-timescaledb]: /how-to-guides/update-timescaledb/update-timescaledb/ | ||
[update-tsdb-2]: /how-to-guides/update-timescaledb/update-timescaledb-2/ | ||
[upgrade-pg]: /how-to-guides/update-timescaledb/upgrade-postgresql/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.