Optimize Postgres on Neon serverless
neon-postgresskillsetup L2★0
Sheshiyer/skill-clusters ↗What it does
Configure Postgres on Neon with pooling and branching
Best for
Serverless Postgres when you need per-PR/preview branches and connection pooling for high-concurrency edge/serverless functions.
Inputs
- · [object Object]
- · [object Object]
- · [object Object]
Outputs
- · [object Object]
- · [object Object]
- · [object Object]
Requires
- · Neon.tech account
- · Prisma or Drizzle ORM
- · @neondatabase/serverless (for Drizzle)
- · PgBouncer (built into Neon pooler endpoint)
Preconditions
- · Neon project created with DB
- · CONNECTION_URL and DIRECT_URL environment variables set
- · ORM installed locally
Failure modes
- · Using pooled connection for migrations (DDL fails through PgBouncer)
- · Not using -pooler endpoint, exhausting direct connection limits
- · HTTP driver used for transactions (only WebSocket driver supports tx)
- · Forgetting directUrl in Prisma schema, migrations hang
Trust signals
- · Neon official documentation
- · Prisma and Drizzle integration guides
- · Pool limit documented (10K concurrent)
- · Anti-patterns and fixes for both ORMs