magda-io / magda

A federated, open-source data catalog for all your big data and small data
https://magda.io
Apache License 2.0
515 stars 93 forks source link

Test Google CloudSQL & AWS RDS PostgreSQL Migration Process with v1 #3244

Closed t83714 closed 3 years ago

t83714 commented 3 years ago

Test Google CloudSQL & AWS RDS PostgreSQL Migration Process with v1

t83714 commented 3 years ago

~We should upgrade cloudSQL proxy default version to 1.26.0~. ~Test shows it's more stable than 1.11 when connect to Cloud SQL remotely (outside google cloud) with unstable network~ above was not true for some case

t83714 commented 3 years ago

Steps for CloudSQL (using using Google's DMS):

Please note: Google DMS won't be able to handle everything --- see FAQ

GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO client;
GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA public TO client;

ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT, INSERT, UPDATE, DELETE ON TABLES TO client;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT USAGE, SELECT ON SEQUENCES TO client;

After grant permission to client user, you can login db as client user to verify you can see all tables.

t83714 commented 3 years ago

AWS RDS Upgrade can be simply done by modify RDS instance and choose a new version. More info: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.PostgreSQL.html#USER_UpgradeDBInstance.PostgreSQL.MajorVersion

t83714 commented 3 years ago

tested v1.0.0-alpha.5 in dev cluster with both cloudSQL and RDS ---- all worked well

t83714 commented 2 years ago

@steve9164 this is the GCP postgreSQL upgrade instruction we talked the other day