project-icp / bee-pollinator-app

The web application front end for the ICP Pollinator Decision Support Tool 🐝
Apache License 2.0
6 stars 1 forks source link

Upgrade PostgreSQL in staging environment #528

Closed rbreslow closed 4 years ago

rbreslow commented 5 years ago

After https://github.com/project-icp/bee-pollinator-app/issues/527 is complete, upgrade PostgreSQL for RDS in staging to match the version selected.

hectcastro commented 4 years ago
$ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
$ sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
$ sudo apt-get update
$ sudo apt-get install postgresql-client-9.4
$ sudo apt-get purge postgresql-client-9.3
$ sudo apt-get autoremove
$ tmux new -s psql
$ psql -h database.service.icp.internal -U icp_bees -d icp_bees
icp_bees=> set maintenance_work_mem='256 MB';
icp_bees=> \timing
icp_bees=> VACUUM (FREEZE, ANALYZE, VERBOSE);
icp_bees=> ALTER EXTENSION postgis UPDATE;
icp_bees=> SELECT PostGIS_full_version();
icp_bees=> set maintenance_work_mem='256 MB';
icp_bees=> \timing
icp_bees=> VACUUM (FREEZE, ANALYZE, VERBOSE);
icp_bees=> ALTER EXTENSION postgis UPDATE TO '2.3.7';
icp_bees=> SELECT PostGIS_full_version();
$ sudo apt-get install postgresql-client-9.6
$ sudo apt-get purge postgresql-client-9.4
$ sudo apt-get autoremove
icp_bees=> set maintenance_work_mem='256 MB';
icp_bees=> \timing
icp_bees=> VACUUM (FREEZE, ANALYZE, VERBOSE);