lathe docs

PostgreSQL vs Supabase

Supabase is Postgres plus a platform.Here is which part is which.

PostgreSQL is the database. Supabase is a hosted platform built around it: every project gets a Postgres database, with an API layer, sign-in, file storage, realtime and edge functions around it. So the question is rarely Postgres or Supabase; it is how much of the platform your app uses. Lathe runs the Postgres part, and sign-in that supabase-js keeps working with, on a dedicated machine of your own for a flat price.

What is Postgres, and what is the platform.

Plain Postgres
Tables, SQL, indexes, row-level security, roles, extensions such as pgvector, and pg_dump. All of it works the same on any PostgreSQL server, because it is PostgreSQL.
The API layer
Supabase generates a REST and GraphQL API from your schema, so a front end can query without a server of its own. Without it, your app talks to Postgres through a driver or an ORM, which is how most server-side apps already work.
Sign-in
Supabase Auth keeps the users in an auth schema of the same database. Lathe's sign-in is built on the same open-source server, so supabase-js sign-in calls keep working against it.
Storage, realtime and functions
File storage, change feeds over websockets and edge functions are platform services, not Postgres. Lathe does not offer them as managed services; your own app on the same machine can do the work they did.
The shape of the bill
Supabase bills a subscription plus usage past what the plan includes: users, disk, egress and compute (the Supabase alternative guide has the current numbers). Lathe bills the machine, $15 to $89 a month, with storage and 20 TB of traffic included.
When Supabase is the better choice
When the front end queries the database directly through the generated API, or when realtime, storage and edge functions do real work in your app. Rebuilding those costs more than a smaller bill saves.

Good for

  • Deciding whether you need the platform or only the database
  • An app that talks to Postgres through an ORM and uses supabase-js only for sign-in
  • Moving the database off Supabase and keeping row-level security
  • Explaining to a teammate what Supabase adds to Postgres

Questions

Is Supabase just PostgreSQL?

No. Every Supabase project has a real PostgreSQL database, and the platform adds an API layer, sign-in, storage, realtime and functions around it. The database part is standard Postgres and moves with pg_dump.

Can I use supabase-js with plain Postgres?

For sign-in, yes, against Lathe's Auth URL and anon key. For queries, supabase-js talks to the generated API rather than to Postgres, so without that layer your server queries Postgres with a normal driver.

Does row-level security need Supabase?

No. It is a PostgreSQL feature. What changes is who sets the user for each request: the API layer did it from the token, and without it your app sets it once per request.

How do I move from Supabase to plain Postgres?

pg_dump from the Supabase database, pg_restore into the new server, change the connection string. The Supabase alternative guide walks through the sign-in and the app as well.

Every number on this page comes from the pricing page's facts.

The Postgres part, and the sign-in, from $15 a month.

Live about 5 minutes on average after checkout. Cancel any time; Mini starts with a 14-day free trial.

Start free - 14 days, no card needed