Question

How do I connect to a postgres connection pool with managed databases?

We have decided to use Postgres and digital oceans managed databases for our next project. This database will handle about 10 million page visits a month, with certain points having spikes in traffic. We created a database, and were able to connect to it just fine.

We created a new connection pool, and the connection details are different than our other database. It has a different port and a different database listed. When we try to connect with the connection pool details, we get the error database "test-pool" does not exist

We are also using sequelize 5.xx and node js. Haven’t had any issues up until trying to utilize connection pooling. Any ideas or suggestions?

Show comments

Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

To answer my own question, use the pool name to connect instead of the db name.

postgresql://{user_name}:{password}@datalab-do-user-6674409-0.b.db.ondigitalocean.com:{pool_port_number}/{pool_name}?sslmode=require

I hope this helps people who might have the same question out.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.