When doing a database engine upgrade to PostgreSQL 12, should the Gemfile be updated for the 'pg' gem as well? How are they related?

524 views Asked by At

Gemfile specifies gem 'pg', '~> 0.18' and the database engine is currently PostgreSQL 9.6 - which needs to be upgraded to PostgreSQL 12. Gemfile.lock includes pg (0.21.0) and pg (0.18.0). I don't have a good understanding of how these two are related, if they are at all related. How do the libraries relate to the database engine?

1

There are 1 answers

0
Suraj Rajput On

As the homepage of ruby-pg suggests that it works with 9.3 and later, I don't think you need to update your Gemfile. All the versions of pg gem should support PostgreSQL 9.3 and above.