Skip to content

Commit

Permalink
Bump live-migration to v0.0.18 and add FAQ for target_replay_rate stu…
Browse files Browse the repository at this point in the history
…ck at 0B/s (#3231)

* chore: bump live-migration to v0.0.18

Signed-off-by: Harkishen-Singh <[email protected]>

* chore: add FAQ for target_replay_rate at 0B/s

Signed-off-by: Harkishen-Singh <[email protected]>

---------

Signed-off-by: Harkishen-Singh <[email protected]>
  • Loading branch information
Harkishen-Singh authored Jun 5, 2024
1 parent b452f8d commit 5009185
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 7 deletions.
2 changes: 1 addition & 1 deletion _partials/_migrate_live_migration_cleanup.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ docker run --rm -it --name live-migration-clean \
-e PGCOPYDB_TARGET_PGURI=$TARGET \
--pid=host \
-v ~/live-migration:/opt/timescale/ts_cdc \
timescale/live-migration:v0.0.16 clean --prune
timescale/live-migration:v0.0.18 clean --prune
```

The `--prune` flag is used to delete temporary files in the `~/live-migration` directory
Expand Down
8 changes: 4 additions & 4 deletions _partials/_migrate_live_migration_docker_subcommand.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ docker run --rm -it --name live-migration \
-e PGCOPYDB_TARGET_PGURI=$TARGET \
--pid=host \
-v ~/live-migration:/opt/timescale/ts_cdc \
timescale/live-migration:v0.0.16 --help
timescale/live-migration:v0.0.18 --help

Live migration moves your PostgreSQL/TimescaleDB to Timescale Cloud with minimal downtime.

Expand Down Expand Up @@ -53,7 +53,7 @@ docker run --rm -it --name live-migration-snapshot \
-e PGCOPYDB_TARGET_PGURI=$TARGET \
--pid=host \
-v ~/live-migration:/opt/timescale/ts_cdc \
timescale/live-migration:v0.0.16 snapshot
timescale/live-migration:v0.0.18 snapshot
```

In addition to creating a snapshot, this process also validates prerequisites on the source and target to ensure the database instances are ready for replication.
Expand All @@ -77,7 +77,7 @@ docker run --rm -it --name live-migration-migrate \
-e PGCOPYDB_TARGET_PGURI=$TARGET \
--pid=host \
-v ~/live-migration:/opt/timescale/ts_cdc \
timescale/live-migration:v0.0.16 migrate --help
timescale/live-migration:v0.0.18 migrate --help
usage: main.py migrate [-h] [--dir DIR] [--resume] [--skip-roles] [--table-jobs TABLE_JOBS] [--index-jobs INDEX_JOBS]
[--skip-extensions [SKIP_EXTENSIONS ...]] [--skip-table-data SKIP_TABLE_DATA [SKIP_TABLE_DATA ...]]

Expand Down Expand Up @@ -107,7 +107,7 @@ docker run --rm -it --name live-migration-migrate \
-e PGCOPYDB_TARGET_PGURI=$TARGET \
--pid=host \
-v ~/live-migration:/opt/timescale/ts_cdc \
timescale/live-migration:v0.0.16 migrate
timescale/live-migration:v0.0.18 migrate
```
<Highlight type="note">
If the migrate command stops for any reason during execution, you can resume
Expand Down
5 changes: 3 additions & 2 deletions migrate/live-migration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,12 @@ For more information, refer to the step-by-step migration guide:
- [Live migration from PostgreSQL][from-postgres]
- [Live migration from TimescaleDB][from-timescaledb]

Remember to go through the [Frequently Asked Questions][FAQ] section before starting
live migration.

If you are migrating from AWS RDS to Timescale, you can refer to [this][live-migration-playbook] playbook
for a detailed migration guide.

If you encounter any issues or have questions about live migration, refer to the [FAQ] section.

[from-postgres]: /migrate/:currentVersion:/live-migration/live-migration-from-postgres/
[from-timescaledb]: /migrate/:currentVersion:/live-migration/live-migration-from-timescaledb/
[pg-dump-and-restore]: /migrate/:currentVersion:/pg-dump-and-restore/
Expand Down
18 changes: 18 additions & 0 deletions migrate/live-migration/live-migration-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,21 @@ At present, live migration does not allow for excluding schemas or tables from
replication, but this feature is expected to be added in future releases.
However, a workaround is available for skipping table data using the `--skip-table-data` flag.
For more information, please refer to the help text under the `migrate` subcommand.
## "target_replay_rate" is 0B/s even after waiting for several minutes
This is a known issue with live migration. In some cases, live migration may log the
following progress information.
```sh
WARNING: live-replay not keeping up with source load (source_wal_rate: 2.0MiB/s, target_replay_rate: 0B/s, replay_lag: 288MiB)
```
This means that live migration is not replicating changes to the target, causing the
replay lag to keep increasing. If you see the `target_replay_rate` at `0B/s` for more
than 10 minutes, a workaround is to stop the live migration using `CTRL + C` and
resume it using the resume flag: `./live-migration migrate --resume`.
This will restart the `migrate` process from where it left, and the `target_replay_rate` should no
longer be `0B/s`. If the issue persists, please reach out to the Timescale migration team
or share it in the `#migration` channel on Timescale community Slack.

0 comments on commit 5009185

Please sign in to comment.