Skip to content

Should PGBouncer be used when using supabase with fly.io #28

Answered by michaelwills
msevestre asked this question in Q&A
Discussion options

You must be logged in to vote

First, thank you for the project @rphlmr. I hadn't checked for a few months and the updates look quite good!

For fly.io once you go multi-region it helps. Migrations will fail though unless you use the original non-pgbouncer URL. See prisma/prisma#14069. I have some other values in the connection string so I override it with this which works so far:

    "db:deploy-migration": "cross-env DATABASE_URL=$(dotenv -- bash -c 'echo $DATABASE_URL_NO_PGBOUNCER') prisma migrate deploy",

though that feels clunky. The other issue mentioned you really just need use the 5432 default port for migrations.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@rphlmr
Comment options

Answer selected by rphlmr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
enhancement New feature or request
3 participants