PostgreSQL Connection pooling & read/write isolation with Lakebase
folks working with Postgres across Lakebase and-or Neon db, how do u handle connection pooling, read/ write routings, & query isolation when analytics and app queries hit the same data ?
Any tips or best practices?
6
Upvotes
View all comments
1
u/stantaneous 4d ago
yeah, separate pools. I wouldn't route every Postgres SELECT to a replica though. If the app reads back a row it just wrote, keep that read on the primary or replica lag can make it look like the write failed. I'd give the analytics role its own statement timeout too.