Connection Pooling with PgBouncer

Hello everyone, I need to connect directly to the Postgres DB provided by Supabase in a serverless function, I can see it supports PgBouncer there How can I connect to the pgbouncer and make use of that? Is it by a normal PgConnection string? Do I need to use PgPool from pg package on Node js?
5 Replies
garyaustin
garyaustin3y ago
I think this is still accurate.... https://supabase.com/blog/supabase-pgbouncer
Supabase
PgBouncer is now available in Supabase
Better support for Serverless and Postgres.
garyaustin
garyaustin3y ago
Database Connections | Supabase
There are various ways to connect to your Postgres database.
mohammed-io
mohammed-ioOP3y ago
Thank you. I've seen those already. However, do I need any special tool to connect them from my serverless function? Do I need to use Pool?
garyaustin
garyaustin3y ago
Ah, maybe someone here has advice for you, but the ports you are asking about are standard Postgres stuff. You are limiting your responses/searches by looking at Supabase specific info.
mohammed-io
mohammed-ioOP3y ago
I see. So, I will look into the wider Postgres community Thank you

Did you find this page helpful?