From 77e780d1f015dfcb4cd67f12471c55ae32aab070 Mon Sep 17 00:00:00 2001 From: Varjitt Jeeva Date: Mon, 18 Sep 2023 11:03:16 -0400 Subject: [PATCH] fix: precheck parameter value guidelines updated for #267 --- docs/quickstart.md | 8 ++++---- pgbelt/cmd/preflight.py | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/quickstart.md b/docs/quickstart.md index 6e82538..8e5848a 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -107,10 +107,10 @@ Both your source and target database must satisfy the following requirements: - All data to be migrated must be owned by a single login user. - There must be a postgres superuser with a login in the database. - Have the following parameters: - - `max_replication_slots` >= 20 - - `max_worker_processes` >= 20 - - `max_wal_senders` >= 20 - - `shared_preload_libraries` must include both `pg_stat_statements` and `pglogical`. *NOTE:* You must ensure your destination database has all required extensions for your schema. + - `max_replication_slots` >= 2 (at least 2 for use by this tool, add more if other tools are using slots as well) + - `max_worker_processes` >= 2 (should be as high as your CPU count) + - `max_wal_senders` >= 10 (Postgres default is 10, should not be lower than this) + - `shared_preload_libraries` must include both `pg_stat_statements` and `pglogical`. _NOTE:_ You must ensure your destination database has all required extensions for your schema. - If your db is on AWS RDS you must also set `rds.logical_replication = 1` # Migration Steps diff --git a/pgbelt/cmd/preflight.py b/pgbelt/cmd/preflight.py index 8afaa5c..88c7695 100644 --- a/pgbelt/cmd/preflight.py +++ b/pgbelt/cmd/preflight.py @@ -59,15 +59,15 @@ async def _print_prechecks(results: list[dict]) -> list[list]: ), style( r["max_replication_slots"], - "green" if int(r["max_replication_slots"]) >= 20 else "red", + "green" if int(r["max_replication_slots"]) >= 2 else "red", ), style( r["max_worker_processes"], - "green" if int(r["max_worker_processes"]) >= 20 else "red", + "green" if int(r["max_worker_processes"]) >= 2 else "red", ), style( r["max_wal_senders"], - "green" if int(r["max_wal_senders"]) >= 20 else "red", + "green" if int(r["max_wal_senders"]) >= 10 else "red", ), style( pg_stat_statements,