Menu

Two Postgres clients, one database, and the only option they agree on is the one the pooler forces
📰

Two Postgres clients, one database, and the only option they agree on is the one the pooler forces

DEV Community: nextjs·Daniel Pertu·4 days ago
#hUy0bOao
#devtonextjs#devto#dev#client#postgres
Reading 0:00
15s threshold

PubTrivia is two deployments against one Supabase Postgres. There is a Next.js app on Vercel, which is everything you can see at pub-trivia.app , and there is a long-running WebSocket process on Railway that keeps a live quiz night in sync. Both of them talk to the same database with the same library, postgres-js behind Drizzle.

They do not share a client. There are two files, 80 lines and 40 lines, and almost every option in one is the opposite of the same option in the other. That is not drift. It is the one thing in our infrastructure where the same dependency, pointed at the same database, genuinely wants two different configurations, and writing them down side by side is the clearest explanation of serverless I have in the repository.

The option they agree on

prepare : false ,

Enter fullscreen mode

Exit fullscreen mode

Both files set it.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.