DEV Community

Atlas Whoff
Atlas Whoff

Posted on

PlanetScale vs Neon vs Supabase: Serverless Postgres in 2026

PlanetScale vs Neon vs Supabase: Serverless Postgres in 2026

Choosing a database hosting provider affects your bill, your branching workflow, and how your app scales. Here's the state of serverless Postgres in 2026.

The Contenders

Neon — Serverless Postgres with branching

True serverless: scales to zero when idle (free tier: 0.5 GB, auto-suspend).

Key features:

  • Database branching (like git branches for your DB)
  • Scale-to-zero (cost: $0 when idle)
  • Instant point-in-time restore
  • HTTP API — works in Edge Runtime

Pricing: Free tier → $19/mo Pro

Best for: Teams with dev/staging/prod DB branches, serverless apps

Supabase — Postgres + Backend as a Service

Postgres plus auth, storage, realtime subscriptions, and edge functions built in.

Key features:

  • Auto-generated REST + GraphQL API
  • Built-in auth (replaces Auth.js)
  • Realtime subscriptions via Postgres replication
  • Storage (replaces S3 for many use cases)

Pricing: Free tier (2 projects) → $25/mo Pro

Best for: Apps that want backend-as-a-service, full-stack in one platform

Turso — libSQL (SQLite) at the edge

SQLite forks deployed globally, replicated to 35+ regions. Ultra-low latency reads.

Pricing: Free tier → $29/mo

Best for: Read-heavy apps, global distribution, Edge Runtime

Neon Branching Workflow

# Create a branch for a PR
neon branches create --name feature/new-schema

# Point your preview deploy to this branch
DATABASE_URL=postgresql://user:pass@ep-branch.neon.tech/dbname

# Migrate on the branch, not production
npx prisma migrate dev

# Merge PR → merge branch → promote to production
neon branches set-primary feature/new-schema
Enter fullscreen mode Exit fullscreen mode

Connecting Prisma to Neon

// For serverless — use connection pooling
// DATABASE_URL should point to the pooler endpoint
// postgresql://user:pass@ep-pooler.neon.tech/dbname?pgbouncer=true

generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
  directUrl = env("DIRECT_URL") // For migrations, bypasses pooler
}
Enter fullscreen mode Exit fullscreen mode

Supabase Realtime

import { createClient } from '@supabase/supabase-js';

const supabase = createClient(url, key);

// Subscribe to new rows in a table
supabase
  .channel('orders')
  .on('postgres_changes', { event: 'INSERT', schema: 'public', table: 'orders' },
    (payload) => console.log('New order:', payload.new)
  )
  .subscribe();
Enter fullscreen mode Exit fullscreen mode

Recommendation by Use Case

Use Case Pick
Standard Next.js SaaS Neon
Need auth + storage + realtime Supabase
Edge/global reads Turso
Heavy writes, complex queries Traditional VPS Postgres

The AI SaaS Starter Kit ships pre-configured for Neon + Prisma with connection pooling and migration scripts. $99 at whoffagents.com.

Top comments (0)