From df70a139e1761cc04549d6961700e576fe38dd2e Mon Sep 17 00:00:00 2001 From: Xin Li <59580070+xin-hedera@users.noreply.github.com> Date: Thu, 27 Jan 2022 11:39:51 -0600 Subject: [PATCH] Update postgresql data migration guide (#3223) - Add flags and values to speed up create index Signed-off-by: Xin Li Signed-off-by: Matheus DallRosa --- docs/database.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/database.md b/docs/database.md index b5899201985..0cb1f8d1426 100644 --- a/docs/database.md +++ b/docs/database.md @@ -21,8 +21,8 @@ data, configure the new PostgreSQL instance, and restore the data. - Importer for the old PostgreSQL database instance is stopped - The new PostgreSQL database instance -- An ubuntu virtual machine with fast network speed connections to both PostgreSQL database instances. The instance should also have - enough free disk space for the database dump +- An ubuntu virtual machine with fast network speed connections to both PostgreSQL database instances. The instance + should also have enough free disk space for the database dump ### Backup @@ -53,11 +53,16 @@ The following configuration needs to be applied to the database instance to impr ``` checkpoint_timeout = 30m +maintenance_work_mem = 2GB +max_parallel_maintenance_workers = 4 max_wal_size = 512GB temp_file_limit = 2147483647kB ``` -Note: once the data is restored, revert the values back for normal operation. +Note: + - Not all flags are available in managed database services. For example, `max_parallel_maintenance_workers` is not + available in Google Cloud SQL. + - Once the data is restored, revert the values back for normal operation. ### Restore