-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: document live migration from TimescaleDB to Timescale (#2897)
* docs: live migration from TimescaleDB to Timescale * docs: update PG to TS live migration doc
- Loading branch information
1 parent
bd9be6d
commit 8fb6943
Showing
6 changed files
with
740 additions
and
341 deletions.
There are no files selected for viewing
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,48 @@ | ||
import SetupSourceTarget from "versionContent/_partials/_migrate_set_up_source_and_target.mdx"; | ||
|
||
<SetupSourceTarget /> | ||
|
||
It's important to ensure that the `old_snapshot_threshold` value is set to the | ||
default value of `-1` in your source database. This prevents PostgreSQL from | ||
treating the data in a snapshot as outdated. If this value is set other than | ||
`-1`, it might affect the existing data migration step. | ||
|
||
To check the current value of `old_snapshot_threshold`, run the command: | ||
|
||
```sh | ||
psql -X -d $SOURCE -c 'show old_snapshot_threshold' | ||
``` | ||
|
||
If the query returns something other than `-1`, you must change it. | ||
|
||
If you have a superuser on a self-hosted database, run the following command: | ||
|
||
```sh | ||
psql -X -d $SOURCE -c 'alter system set old_snapshot_threshold=-1' | ||
``` | ||
|
||
Otherwise, if you are using a managed service, use your cloud provider's | ||
configuration mechanism to set `old_snapshot_threshold` to `-1`. | ||
|
||
Next, you should set `wal_level` to `logical` so that the write-ahead log (WAL) | ||
records information that is needed for logical decoding. | ||
|
||
To check the current value of `wal_level`, run the command: | ||
|
||
```sh | ||
psql -X -d $SOURCE -c 'show wal_level' | ||
``` | ||
|
||
If the query returns something other than `logical`, you must change it. | ||
|
||
If you have a superuser on a self-hosted database, run the following command: | ||
|
||
```sh | ||
psql -X -d $SOURCE -c 'alter system set wal_level=logical' | ||
``` | ||
|
||
Otherwise, if you are using a managed service, use your cloud provider's | ||
configuration mechanism to set `wal_level` to `logical`. | ||
|
||
Restart your database for the changes to take effect, and verify that the | ||
settings are reflected in your database. |
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.