Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Upgrade local eRegs DB to use Postgres 11 #499

Closed
3 tasks done
Tracked by #137
patphongs opened this issue May 14, 2020 · 2 comments
Closed
3 tasks done
Tracked by #137

Upgrade local eRegs DB to use Postgres 11 #499

patphongs opened this issue May 14, 2020 · 2 comments
Assignees
Milestone

Comments

@patphongs
Copy link
Member

patphongs commented May 14, 2020

Summary

What we're after:
The eRegs postgres databases in our cloud environment is now using postgress version 11. We need to make sure our local environment is running the same version, especially for those team members working on parsing eregs.

Related issues

Completion criteria

  • Local eRegs database is running using Postgres V11

Tech steps or considerations

  • Try running both Postgres V11 and Postgres V10.7 locally
  • Run local eRegs database using Postgres V11
@pkfec
Copy link
Contributor

pkfec commented Jun 24, 2020

Steps to install/setup postgres11 via homebrew:

  1. Install pg11
  • run brew install postgresql@11
  1. Export postgresql v11 path to bash_profile
  • run echo 'export PATH="/usr/local/opt/postgresql@11/bin:$PATH"' >> /Users/pkasireddy/.bash_profile
  1. Start the pg11 service
  • run brew services start postgresql@11
  1. check if pg11 service is UP and running
  • run brew services list

To test/parse eregs on local pg11 DB:

  1. Instructions on how to run parser env: https://github.com/fecgov/fec-eregs#loading-fecs-regulations

  2. On eregs repo activate python 3.6.1 virtual environment

  • run pyenv activate eregs361
  1. Create a test db
  • run createdb eregs-test
  1. Use a tool (pgadmin) or psql to connect to the test eregs db to confirm the eregs-test db is of PG v11
  • run psql postgres :

Screen Shot 2020-06-24 at 8 25 59 AM

  1. Parser regs on local on eregs repo
  • run python load_regs/load_fec_regs.py
  1. Use a tool (pgadmin) or psql to connect to the test eregs db:
  • Verify that the test eregs db PG v11.8.
    -- run SELECT version();
  • Also check all 45 regs parsed by running the following script
    -- run SELECT count(*) FROM public.regcore_notice;

@pkfec
Copy link
Contributor

pkfec commented Jun 25, 2020

On cloud.gov eregs shared DB version is PG 11. I have setup PG10 and PG11 on my local env and parse 2020 regs on my local without any issues. Testing is DONE. Hence closing this ticket

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

No branches or pull requests

3 participants