Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting up Aurora database instance version 10.7 for testing (database creation and data loading) #4286

Closed
4 tasks done
JonellaCulmer opened this issue Apr 8, 2020 · 1 comment
Assignees
Milestone

Comments

@JonellaCulmer
Copy link
Contributor

JonellaCulmer commented Apr 8, 2020

Summary

What we're after:
Aurora database (an advanced version of postgresql database on AWS) was suggested by AWS Envision team to help alleviate the slow query problem we had encountered with increasing amount of data. The first step to migrate from our current postgresql database to Aurora database instance is to set up test Aurora database instance and load real data as the base for test out all applications that load/query data from it.

Related issues

Completion criteri

  • Create a Aurora version 10.7 database instance
  • Create database, set up database roles/permission
  • Backup data from current postgresql database and create/load databases objects and data into the new Aurora database
  • Create replicas for developers to connect and test

Future work

@fecjjeng
Copy link
Contributor

fecjjeng commented Apr 21, 2020

  • From AWS console, an aurora database cluster with version 10.7 had been created. This is the highest version supported in gov cloud and also the python package support is compatible with our current code.
  • A master database instance (read/write) was created.
  • A user generation script had been created by querying current dev database for users and permissions. This script were used to re-create users in the current dev database in the new dev-Aurora database.
  • An ec2 server had been setup in gov cloud and was used to run pg_dump from the current postgres dev database and pg_restore into the new dev-Aurora database.
  • NOTE: Since the purpose of this load is to provide reasonable amount of data for testing purpose, data load to the postgresql dev database such as GoldenGate was not stopped.
    In the situation during the real switch, data load to the source database will be stopped until the switch complete.
  • To provide a reference in estimation on the time required during real switch time:
    The pg_dump takes about 3.5 hours. The pg_restore, with 5 jobs running, takes about 16 hours.
  • Read replica instance created after initial load of the master database had been completed
    (2 read-replicas had been created for our initial testing. At the end of this initial setup testing, only 1 read-replica is kept for further user testing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants