项目文件夹

文件
wehub-resource-sync bb5c75ce05
Component Security Validation / Security Audit (push) Has been cancelled
Deploy to Cloudflare Pages / deploy (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:38:58 +08:00

1 行
1.6 KiB
JSON

{"content": "---\nname: neon-postgres\ndescription: \"Expert patterns for Neon serverless Postgres, branching, connection pooling, and Prisma/Drizzle integration Use when: neon database, serverless postgres, database branching, neon postgres, postgres serverless.\"\nsource: vibeship-spawner-skills (Apache 2.0)\n---\n\n# Neon Postgres\n\n## Patterns\n\n### Prisma with Neon Connection\n\nConfigure Prisma for Neon with connection pooling.\n\nUse two connection strings:\n- DATABASE_URL: Pooled connection for Prisma Client\n- DIRECT_URL: Direct connection for Prisma Migrate\n\nThe pooled connection uses PgBouncer for up to 10K connections.\nDirect connection required for migrations (DDL operations).\n\n\n### Drizzle with Neon Serverless Driver\n\nUse Drizzle ORM with Neon's serverless HTTP driver for\nedge/serverless environments.\n\nTwo driver options:\n- neon-http: Single queries over HTTP (fastest for one-off queries)\n- neon-serverless: WebSocket for transactions and sessions\n\n\n### Connection Pooling with PgBouncer\n\nNeon provides built-in connection pooling via PgBouncer.\n\nKey limits:\n- Up to 10,000 concurrent connections to pooler\n- Connections still consume underlying Postgres connections\n- 7 connections reserved for Neon superuser\n\nUse pooled endpoint for application, direct for migrations.\n\n\n## ⚠️ Sharp Edges\n\n| Issue | Severity | Solution |\n|-------|----------|----------|\n| Issue | high | See docs |\n| Issue | high | See docs |\n| Issue | high | See docs |\n| Issue | medium | See docs |\n| Issue | medium | See docs |\n| Issue | low | See docs |\n| Issue | medium | See docs |\n| Issue | high | See docs |\n"}