Providers

Neon

Serverless Postgres — Connect widget, pooled vs direct, scale-to-zero cold start, neon_superuser for pgvector.

Neon separates storage from compute: branches are cheap copy-on-write metadata, and idle compute scales to zero. Wire protocol is plain Postgres — drivers.store.sql stays postgres.

The one rule

Copy the connection string from Neon's Connect widget. Prefer the pooled hostname for app traffic and the direct hostname for migrations — never invent the -pooler suffix by hand.

Find credentials (current console)

  1. Open console.neon.tech → your project.
  2. On the Project Dashboard, click Connect.
  3. In Connect to your database, pick Branch, Compute, Database, and Role.
  4. Toggle Connection pooling on for the pooled string (hostname gains -pooler), or off for the direct string.
  5. Copy the connection string into DATABASE_URL (add ?sslmode=require if missing).
process env
# Runtime (pooled) — ep-….…-pooler.…neon.tech
DATABASE_URL=postgresql://neondb_owner:…@ep-xxxx-pooler.region.aws.neon.tech/neondb?sslmode=require

# Migrations / pg_dump / LISTEN — same host without -pooler
# OKE_STORE_SQL_URL=postgresql://neondb_owner:…@ep-xxxx.region.aws.neon.tech/neondb?sslmode=require

No images["store.sql"] pin — Neon runs the server.

Pooled vs direct

UseWhich stringWhy
App / serverless / Drizzle runtimePooled (-pooler)PgBouncer transaction mode; up to 10k client connections
oke db migrate / pg_dump / logical replication / LISTENDirect (no -pooler)Session features break under transaction pooling

Do not also put PgDog in front of Neon — one pooler only.

Consequence: seeding or migrations through the pooled URL often fail with prepared-statement errors; switch those jobs to the direct URL.

pgvector and roles

CREATE EXTENSION vector; works on every plan — no add-on. Roles created in the Neon Console / CLI / API get neon_superuser membership and can install supported extensions.

Roles you create only with raw SQL (CREATE ROLE) do not get neon_superuser — they hit permission errors on extension install. Create app roles in the Console (or grant deliberately) when you need pgvector setup from that role.

Free tier / production limits

LimitFree plan
Scale to zeroAfter 5 min idle — cannot disable
Compute100 CU-hours / project / month
Storage0.5 GB / project
AutoscalingUp to 2 CU

Hitting CU-hours or storage suspends compute until the next billing period or an upgrade. Always-on production needs Launch/Scale with scale-to-zero disabled.

Query performance

Create the extension — do not set command

Neon already preloads pg_stat_statements. CREATE EXTENSION is enough. There is no oke command overlay and no online_advisor shim.

StepWhat you do
PreloadNeon compute (already on)
CreateCREATE EXTENSION IF NOT EXISTS pg_stat_statements
ConsoleStore → SQL band → Performance

Scale-to-zero wipes statement stats when compute sleeps. Index Advisor is not in the default Neon catalog — Performance shows a CTA, not a failing Enable.

Real gotcha — cold start

After scale-to-zero, the first query pays a wake-up (hundreds of ms to a few seconds). Health checks that expect sub-100ms on an idle Free project will flap. Paid plans can disable scale-to-zero; Free cannot.

Troubleshooting

Learn more

Next

On this page