Prisma + Supabase (Supavisor) connection pooling

If I am using Prisma in my servers (not serverless, running Docker containers on fly.io should I use the Connection Pooling string or the Direct Connection string? The docs say use pooling if using Prisma but also say only for serverless.

Additionally Prisma says to run pgbouncer in transaction mode for the most reliable functionality but Supabase says that prepared statements are not available in transaction mode (but are in session mode). Prisma uses prepared statements internally. I am assuming that I want to run it in session mode (if I use the connection pooling).

So 2 questions:
  1. do I use connection pooling? (We would have 4 different servers connecting to the DB)
  2. If I do, should I use session mode since Prisma requires prepared statements?
Was this page helpful?