Short answer: If you searched supabase vs postgres, the honest framing is that it is not a database-versus-database choice. Supabase is Postgres, plus a bundle on top: auth, auto-generated REST and GraphQL APIs, file storage, realtime, edge functions and a dashboard. “Plain Postgres” means you get only the database (managed on Neon, RDS, Railway and friends, or self-hosted on a VPS) and you build or buy the rest. Pick Supabase when you would use at least two of those extras in the first month. Pick plain Postgres when your app already has its own backend and auth, or you only need a place to put tables. Either way, the data is portable; the real lock-in sits in auth and Row Level Security policies, and this post shows how to check and handle that.
Last updated: November 21, 2026. Prices come from supabase.com/pricing, the Supabase compute docs and neon.com/pricing, read on November 21, 2026. The RLS compatibility test and the lock-in audit output below were run on a Linux box against a local, plain PostgreSQL 17.12 server on the same day; I did not run them against a live Supabase project, so there are no “my production app” numbers here. Forum opinions are paraphrased from r/webdev, r/Supabase and Hacker News.
Supabase vs Postgres at a glance
| Supabase (hosted) | Managed plain Postgres (e.g. Neon) | Self-hosted Postgres on a VPS | |
|---|---|---|---|
| What you get | Postgres + auth, Data API, storage, realtime, edge functions, Studio | Postgres only (some hosts now add extras) | Postgres only |
| Free tier | 500 MB database, 2 active projects, paused after 1 week idle | Neon Free: 100 CU-hours per project, 1 GB per project, scales to zero after 5 min | None; you pay for the server |
| Entry paid price | Pro from $25/month, includes one Micro compute ($10 credit) | Neon Launch: pay as you go, $0.106/CU-hour, $0.35/GB-month | Whatever the VPS costs |
| Backups | Pro: daily, kept 7 days; PITR from $100/month | Neon Launch: restore window up to 7 days | Your cron job, or nothing |
| Who maintains it | Supabase | The host | You |
| Best for | MVPs that need login + files + DB fast | Apps with their own backend, many small DBs, preview branches | People who like ops, or need full control |
The pattern from every forum thread I read: people who regret Supabase usually used it as “just a database” and paid for a bundle they never touched; people who regret plain Postgres usually spent their first two weekends building login, password reset and file uploads.
What Supabase adds on top of plain Postgres
Strip the marketing away and Supabase gives a solo founder five things that plain Postgres does not:
- Auth (email, magic links, OAuth providers) with users stored in an
authschema inside your own database. - A generated Data API (PostgREST), so your frontend can query tables directly with an API key, protected by Row Level Security.
- Storage for files, with access policies written in the same SQL style as your table policies.
- Realtime subscriptions over WebSockets.
- Studio, the dashboard, plus a local Docker dev environment and client SDKs.
Supabase’s own pricing page now says it plainly: a project can be used as a standalone Postgres database, you connect with psql, Prisma, Drizzle or any Postgres client, and unused products cost nothing. So “Supabase vs Postgres” is really “do I want those five things, and at what price”.
The sceptic’s view showed up clearly in a Hacker News thread about Supabase’s funding round: one commenter asked whether it was just slow, expensive Postgres. The replies that pushed back did not argue about query speed at all. They pointed at the click-once setup for hobby projects, auth that almost every app needs, storage buckets and the local Docker environment. That is the right lens: you are paying for not assembling a backend, not for a faster database.
When plain Postgres is the better call
A popular r/webdev question (September 2025) put the other side well: if you already write your own domain layer to keep data valid, and you do not want authorization tied to one vendor, what is left for Supabase to do? In an April 2026 r/webdev thread about self-hosting Postgres versus Supabase, the top reply made the same point from the hosting side: if all you want is managed Postgres, you can find it cheaper elsewhere, or host it yourself if you know how.
Plain Postgres wins when:
- You already have a backend. A Django, Rails, Laravel, Go or Node API that owns business logic and sessions gets little from PostgREST and a second auth system.
- You want many small databases. On Supabase every project carries its own compute (a second Micro project adds about $10/month on Pro). Neon’s Free plan allows 100 projects and bills paid compute per hour with scale-to-zero, which suits a database per client or per preview branch.
- Your auth lives elsewhere. If you use Clerk, Better Auth, Auth.js or your framework’s built-in auth, Supabase Auth is dead weight.
- You are comfortable doing ops. A VPS with Postgres is cheap, and you choose extensions, versions and config. You also own backups, upgrades, security patches and the 3 a.m. disk-full alert.
When Supabase is worth the $25
- You need login, file uploads and a database in week one. Building and securing these yourself is where weekend projects die.
- Your frontend talks to the database directly (React, Next.js client components, mobile apps). RLS plus the Data API is the whole point.
- You build with an AI agent. Agents know the Supabase SDK and SQL policy patterns well, and the generated API means less backend code for the agent to get wrong. The flip side: an agent will happily create tables without RLS, so run the checks in the vibe-coded app security checklist.
- You want boring backups without thinking. Pro includes daily backups kept for 7 days. On Free there are no automatic backups, and Supabase’s docs recommend exporting yourself with the CLI.
For the full price breakdown (MAUs, egress, disk, compute sizes), see the Supabase pricing guide. If you are still deciding between backends rather than hosts, the Supabase vs Firebase and PocketBase vs Supabase comparisons cover those angles.
What it really costs: a small SaaS, three ways
Using list prices read on November 21, 2026, for one app with a database under 8 GB:
| Setup | Monthly cost | What is included | What is not |
|---|---|---|---|
| Supabase Free | $0 | 500 MB DB, auth, storage (1 GB), 5 GB egress | Paused after 1 week idle; no automatic backups |
| Supabase Pro, one project on Micro | $25 | 8 GB disk, 1 GB RAM compute, daily backups (7 days), 100k MAU | PITR ($100/month per 7 days), more compute |
| Supabase Pro, two projects (prod + staging) on Micro | $35 | Same, twice | Staging is a full second instance |
| Neon Launch, small DB | Usage-based; Neon itself quotes about $15/month typical for a small database | Postgres, scale-to-zero, branches | Auth, storage and API are separate decisions |
| VPS + self-managed Postgres | Server price only | Full control | Backups, monitoring, upgrades, your time |
Two cost traps that come up again and again:
- Staging doubles compute. The $35 example above comes straight from Supabase’s own billing explanation: $25 plan + $10 per Micro project, minus the $10 credit. Use database branching or a local Supabase stack for staging instead of a permanent second project.
- Compute is billed per hour and upgrades need downtime. Supabase’s docs note that changing compute size incurs downtime, so do it in a quiet hour, not during a launch.
For how the database fits into a whole indie stack bill, see the monthly cost of an AI indie dev stack.
Connecting to Supabase like plain Postgres (and the pooler gotchas)
If you go the “Supabase as just Postgres” route, the connection string is where most errors come from. From the Supabase connection docs:
| Your code runs on | Use | Why |
|---|---|---|
| Serverless or edge functions (Vercel, Netlify, Cloudflare) | Shared pooler, transaction mode (port 6543) | Many short-lived connections |
| A long-running server with IPv6 | Direct connection (port 5432) | No pooler in the path |
| A long-running server on IPv4 only | Shared pooler, session mode | The shared pooler is IPv4 on every plan; direct is IPv6 unless you buy the IPv4 add-on |
Migrations, pg_dump, restore | Direct connection (or session pooler if you have no IPv6) | Single sessions using native Postgres commands |
The two errors that bite AI-generated code:
- “prepared statement already exists” in transaction mode. The shared pooler does not support prepared statements there, so turn them off in your driver (for example
prepare: falsein postgres.js, or?pgbouncer=truein a Prisma connection string). - Connection limits on small compute. A Micro instance allows 60 direct and 200 pooler connections. A serverless app that opens a direct connection per request will hit that fast.
Paste this into your agent once, so it stops guessing:
Our database is Supabase Postgres. Rules for any DB code you write:
- Serverless/API routes use DATABASE_URL (transaction pooler, port 6543). Disable prepared statements in the driver.
- Migrations and scripts use DIRECT_URL (direct connection, port 5432).
- Never hardcode connection strings or the service_role key; read them from env vars.
- Every new table in the public schema gets RLS enabled and at least one policy in the same migration.
- Before finishing, list each new table and its policies.
If you deploy the frontend on Vercel or Netlify, the Vercel vs Netlify post covers where env vars live on each.
The real lock-in: auth.uid() and RLS policies
Your tables, rows and indexes move to any Postgres host with pg_dump. What does not move cleanly is everything that points at Supabase’s auth schema: foreign keys to auth.users, triggers on new sign-ups, and RLS policies that call auth.uid(). Inside Supabase, auth.uid() reads the user id (the sub claim) from the JWT of the current request. On plain Postgres that function, the auth schema and the anon / authenticated roles simply do not exist, so the schema dump fails to load.
Step 1: measure your lock-in before deciding
Run this against your Supabase database (direct connection, read-only; it changes nothing):
select 'rls_policies' as item, count(*)::text as n from pg_policies where schemaname='public'
union all select 'policies_using_auth_uid', count(*)::text from pg_policies
where schemaname='public' and (coalesce(qual,'')||coalesce(with_check,'')) ilike '%auth.uid()%'
union all select 'fk_to_auth_users', (select case when to_regclass('auth.users') is null then '0'
else (select count(*)::text from pg_constraint where contype='f' and confrelid = to_regclass('auth.users')) end)
union all select 'extensions_installed', coalesce(string_agg(extname, ', ' order by extname),'none')
from pg_extension where extname not in ('plpgsql')
union all select 'triggers_on_auth_schema', count(*)::text from information_schema.triggers where event_object_schema='auth'
union all select 'storage_objects', (select case when to_regclass('storage.objects') is null then 'no storage schema' else 'exists' end);
Here is the output from my plain Postgres 17 test database, which has one Supabase-style table and policy loaded (on a real Supabase project, extensions_installed will list Supabase’s default extensions too, and you need each of them on the new host):
$ psql -f audit.sql
item | n
-------------------------+-------------------
rls_policies | 1
policies_using_auth_uid | 1
fk_to_auth_users | 1
extensions_installed | none
triggers_on_auth_schema | 0
storage_objects | no storage schema
(6 rows)
How to read it: zero policies and zero foreign keys means you are using Supabase as plain Postgres already, and moving is a dump and restore. Dozens of auth.uid() policies plus storage objects means you are using Supabase as a backend, and leaving means replacing auth and storage too. That is usually the moment to stay.
Step 2: keep your RLS policies working on plain Postgres
If you do move only the database (for example, keeping Supabase Auth but hosting Postgres elsewhere, or switching auth providers that also issue JWTs), you can recreate the pieces your policies expect. This shim mirrors how Supabase’s auth.uid() reads the sub claim:
create role anon nologin;
create role authenticated nologin;
create role service_role nologin bypassrls;
create schema auth;
create table auth.users (id uuid primary key default gen_random_uuid(), email text unique);
create function auth.uid() returns uuid language sql stable as $$
select coalesce(
nullif(current_setting('request.jwt.claim.sub', true), ''),
(nullif(current_setting('request.jwt.claims', true), '')::jsonb ->> 'sub')
)::uuid
$$;
grant usage on schema auth to anon, authenticated;
grant execute on function auth.uid() to anon, authenticated;
Then a typical Supabase-style table and policy load unchanged:
create table public.notes (
id bigint generated always as identity primary key,
user_id uuid not null references auth.users(id) default auth.uid(),
body text not null
);
alter table public.notes enable row level security;
create policy "own notes" on public.notes
for all to authenticated
using (user_id = (select auth.uid()))
with check (user_id = (select auth.uid()));
grant select, insert on public.notes to authenticated;
Your API server then does per request what PostgREST does for you on Supabase: switch to the authenticated role and set the verified JWT claims inside a transaction.
begin;
set local role authenticated;
select set_config('request.jwt.claims', '{"sub":"11111111-1111-1111-1111-111111111111","role":"authenticated"}', true);
select id, body from public.notes;
insert into public.notes (body) values ('written by alice');
insert into public.notes (user_id, body) values ('22222222-2222-2222-2222-222222222222','spoof');
rollback;
Real output on plain PostgreSQL 17.12 with two users and one note each:
$ psql -f test.sql
BEGIN
SET
set_config
-----------------------------------------------------------------------
{"sub":"11111111-1111-1111-1111-111111111111","role":"authenticated"}
(1 row)
id | body
----+------------
1 | alice note
(1 row)
INSERT 0 1
psql:test.sql:7: ERROR: new row violates row-level security policy for table "notes"
ROLLBACK
User A sees only their own row, can insert their own note, and is blocked from writing a row for user B. The policies survived the move without edits.
Pitfalls with this approach:
- Only set the claims after your server has verified the JWT signature. The database trusts whatever you put in
request.jwt.claims. - Use
set localandset_config(..., true)inside a transaction. With a pooler in transaction mode, a plainsetcan leak one user’s identity into another request. - The shim does not give you sign-up, password reset or sessions. It only keeps your existing policies valid.
Moving off Supabase: the dump and restore commands
Supabase documents a logical backup with its CLI that produces three files (roles, schema, data):
supabase db dump --remote="$DIRECT_URL" -f roles.sql --role-only
supabase db dump --remote="$DIRECT_URL" -f schema.sql
supabase db dump --remote="$DIRECT_URL" -f data.sql --use-copy --data-only -x "storage.buckets_vectors" -x "storage.vector_indexes"
These match Supabase’s backup-and-restore guide as of November 2026. CLI flags have changed between versions, so run supabase db dump --help on your installed CLI first and adjust if it lists a different connection flag. Restore with psql in one transaction, with triggers off during the data load:
psql \
--single-transaction \
--variable ON_ERROR_STOP=1 \
--file roles.sql \
--file schema.sql \
--command 'SET session_replication_role = replica' \
--file data.sql \
--dbname "$NEW_DATABASE_URL"
Before you run the restore on a non-Supabase host, load the shim above (or remove auth references from schema.sql), and enable the same extensions. Three things the dump will not carry for you:
- Storage files. Backups include storage metadata, not the files themselves. Copy buckets separately.
- Custom role passwords. Supabase notes that daily backups do not store passwords for custom roles; reset them after restore.
- Vault or column-encryption keys. If you used Supabase Vault, get the root key from the old project before pausing or deleting it.
Self-hosting Supabase: the middle path, with real costs
You can also run Supabase itself on your own server. The official route is Docker Compose with a setup script that generates secrets. One r/Supabase user who moved a production directory site from hosted Supabase to a single 8 GB VPS shared a useful field report. Paraphrasing their main points:
- They trimmed the default stack of roughly 15 containers to 8, and the remaining Supabase services used about 1.3 GB of RAM in total. The API gateway (Kong) was the biggest consumer after Postgres.
- Direct Postgres access on the same machine made batch jobs and cron scripts simpler than going through the REST API.
- Their backups became a nightly
pg_dump, compressed and shipped to another box. - What hurt: rotating the JWT secret logged everyone out and left users in auth loops, and after editing
.enva plaindocker compose restartdid not pick up the change; recreating the containers did. They also found realtime occasionally stuck while Docker reported it healthy.
My take: self-hosted Supabase saves money only if your time is cheap and you were going to run a VPS anyway. For most solo founders, hosted Pro at $25 is cheaper than the hours spent babysitting a dozen containers.
Decision checklist
Answer these five questions honestly:
- Will I use Supabase Auth in the first month? (yes = +1 Supabase)
- Will my frontend or mobile app query the database directly? (yes = +1 Supabase)
- Do I need file uploads with per-user access rules? (yes = +1 Supabase)
- Do I already have a backend framework with its own auth? (yes = +1 plain Postgres)
- Do I need more than two databases (per client, per preview, per agent)? (yes = +1 plain Postgres)
Three or more for Supabase: use it, and stop worrying about lock-in until the audit query above shows dozens of policies you would hate to rewrite. Two or more for plain Postgres: use a managed host and keep your schema free of auth references from day one.
My take
Most “Supabase vs Postgres” arguments are people talking past each other. Supabase is a backend product that happens to use a real Postgres database, which is exactly why leaving is easier than with Firebase. For a vibe-coded MVP that needs accounts and uploads, I would start on Supabase Free, move to Pro the day real users show up (backups and no pausing are worth the $25), and run the lock-in audit every few months so the exit cost never surprises you. If the app is a backend-heavy service with its own auth, I would skip Supabase and use plain managed Postgres from the start.
For where the database fits in the full build-and-ship workflow, see the AI workflow for indie products hub. If you are leaving an app builder that ejects to Supabase, Base44 vs Cursor covers that path.
FAQ
Is Supabase just Postgres?
The database is a regular Postgres database you can reach with psql or any ORM. Supabase adds auth, a generated API, storage, realtime, edge functions and a dashboard around it. You can ignore the extras and use it as plain Postgres; unused products are not billed.
Is Supabase slower than plain Postgres?
The query engine is the same Postgres. Differences come from compute size, network distance and whether you go through the REST API or a pooler. A small shared Micro instance will feel slower than a database on the same machine as your app, which is a hosting difference, not a Supabase vs Postgres difference.
Can I use Prisma or Drizzle with Supabase?
Yes. Use the transaction pooler string for serverless runtime queries with prepared statements disabled, and the direct (or session pooler) string for migrations.
Is Supabase free tier enough for production?
For a demo, yes; for paying users, I would not rely on it. Free projects pause after a week of inactivity, the database is capped at 500 MB, and there are no automatic backups.
How hard is it to migrate from Supabase to another Postgres host?
If the lock-in audit shows no auth.uid() policies and no foreign keys to auth.users, it is a dump and restore. If it shows many, either recreate the auth shim shown above and keep issuing compatible JWTs, or plan a real auth migration.
Should I self-host Supabase to save money?
Only if you already run servers and enjoy it. You trade a $25 bill for maintaining many containers, secret rotation and your own backups.
1 thought on “Supabase vs Postgres (2026): What You Actually Pay For, and How to Leave Without a Rewrite”