Enable Connection Pooler in Local Dev
Update supabase config.toml to enable [db.pooler] and configure the pooler as you wish.
[db.pooler]
enabled = true
# Port to use for the local connection pooler.
port = 54329
# Specifies when a server connection can be reused by other clients.
# Configure one of the supported pooler modes: `transaction`, `session`.
pool_mode = "transaction"
# How many server connections to allow per user/database pair.
default_pool_size = 20
# Maximum number of client connections allowed.
max_client_conn = 100supabase/config.toml
Update database connection
Then, you can update your dabatabase connection string to use pooler-dev user, eg:
postgresql://postgres.pooler-dev:postgres@localhost:54329/postgres