How Supabase and Google Cloud SQL for PostgreSQL compare for a backend's database in November 2026: what each one includes, high availability and SLAs, connections and pooling, access from Cloud Run, and where the data lives.

Supabase wraps Postgres with auth, file storage, realtime and an auto-generated REST API, so a frontend can talk to the database directly. Cloud SQL for PostgreSQL is Google Cloud's managed Postgres, a database only, in your own GCP project next to Cloud Run.
The choice comes down to whether Postgres is the whole backend or one part of a backend on GCP. This guide compares them as databases.
The Cloud SQL figures are from Cloud SQL editions and the high availability overview, and Supabase's from its docs, checked on November 20, 2026.
Supabase is a backend platform with Postgres at the center: Auth stores users in the auth schema, PostgREST turns tables into REST endpoints, Realtime streams changes over WebSockets and Storage keeps files with policies in the same database. Cloud SQL is the database, and the rest comes from other GCP products or your own code, such as Identity Platform for sign-in, Cloud Storage for files and Cloud Run for the API. A team that wants a frontend talking straight to the database gets more from Supabase, and a team with its own API service gets less from Supabase's extras.
A regional Cloud SQL instance replicates every write synchronously to a standby in a second zone before the commit returns, and fails over automatically when the primary or its zone goes down. Point-in-time recovery uses write-ahead logs kept for up to 7 days on Enterprise and 35 on Enterprise Plus, and read replicas can sit in other regions. Supabase handles backups for every project and adds point-in-time recovery and read replicas as options per project, without a synchronous standby in the same sense.
Each Cloud Run instance opens its own database connections, and a burst of traffic that scales a service to 50 instances can exhaust Postgres's connection limit. With Supabase, you connect over the internet with SSL through the Supavisor pooler in transaction mode, which keeps the number of real Postgres connections small. With Cloud SQL, Cloud Run connects over private IP through Direct VPC egress or with the built-in Cloud SQL connection, and IAM database authentication replaces the password with the service account's identity.
Cloud SQL data stays in your GCP project, under your IAM policies, audit logs and organisation constraints, which is what security reviews and customer contracts often ask for. Supabase data lives in Supabase's infrastructure in the region you choose, under Supabase's controls, and moving it into your own cloud later is a migration with downtime planning, as in migrating from Supabase to GCP.
Encore brings infrastructure from code, so a Postgres database is declared in the service that owns it, with its migrations next to the queries. Per the GCP infrastructure docs, deploying to GCP provisions Cloud SQL in your own project with daily backups and point-in-time recovery, keeps it in a private network away from the internet and connects your services on Cloud Run to it. Locally, encore run starts Postgres for the same code, so the database a developer tests against matches production in schema and version.

Run in your terminal to get started locally.
A notes service with its own database, the kind of table a Supabase project would expose through PostgREST with a row-level security policy, here behind an API that checks the owner:
// notes/notes.go
package notes
import (
"context"
"errors"
"time"
"encore.dev/beta/errs"
"encore.dev/storage/sqldb"
)
// Cloud SQL for PostgreSQL on GCP, local Postgres under encore run.
var db = sqldb.NewDatabase("notes", sqldb.DatabaseConfig{
Migrations: "./migrations",
})
type Note struct {
ID int64
OwnerID string
Body string
UpdatedAt time.Time
}
type SaveParams struct {
OwnerID string // from your auth handler in a real app
Body string
}
//encore:api public method=POST path=/notes
func Create(ctx context.Context, p *SaveParams) (*Note, error) {
if p.OwnerID == "" || p.Body == "" {
return nil, &errs.Error{Code: errs.InvalidArgument, Message: "owner and body are required"}
}
n := &Note{OwnerID: p.OwnerID, Body: p.Body}
err := db.QueryRow(ctx, `
INSERT INTO notes (owner_id, body) VALUES ($1, $2)
RETURNING id, updated_at`, p.OwnerID, p.Body).Scan(&n.ID, &n.UpdatedAt)
return n, err
}
type GetParams struct {
OwnerID string
}
//encore:api public method=GET path=/notes/:id
func Get(ctx context.Context, id int64, p *GetParams) (*Note, error) {
n := &Note{ID: id}
// The owner check that a row-level security policy would do in Supabase.
err := db.QueryRow(ctx, `
SELECT owner_id, body, updated_at FROM notes
WHERE id = $1 AND owner_id = $2`, id, p.OwnerID).Scan(&n.OwnerID, &n.Body, &n.UpdatedAt)
if errors.Is(err, sqldb.ErrNoRows) {
return nil, &errs.Error{Code: errs.NotFound, Message: "note not found"}
}
return n, err
}
-- notes/migrations/1_init.up.sql
CREATE TABLE notes (
id BIGSERIAL PRIMARY KEY,
owner_id TEXT NOT NULL,
body TEXT NOT NULL,
updated_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
CREATE INDEX notes_owner_idx ON notes (owner_id, updated_at DESC);
Migrations run on deploy in order, as the Go databases docs describe, and the same docs cover connecting to an existing database when the data already lives somewhere else. For a project that keeps Supabase for sign-in, an auth handler can verify Supabase tokens while the data moves to Cloud SQL, and the auth docs show where that check goes. Teams already on Neon can use it as the database provider instead, per the Neon integration docs.
When a coding agent adds a column, it writes the migration and the query change in the same service and runs them against a local Postgres before opening a pull request, and the deploy applies the migration to Cloud SQL in your project.
Best fit: Backends on GCP that want Cloud SQL in their own project with databases, migrations and access declared next to the service code.
Pick Supabase when Postgres is the backend, with Auth, Storage and an auto-generated API serving a frontend directly, and data location in your own cloud is not a requirement. Pick Cloud SQL when the backend already runs on GCP and you want the database in your project with regional HA, IAM authentication and private networking. Pick Encore when you want Cloud SQL without wiring the instance, network and credentials yourself.
No. Supabase runs its own Postgres instances on infrastructure it manages, and each project gets a dedicated Postgres database together with Supabase's Auth, Storage, Realtime and API services. Cloud SQL is Google Cloud's managed Postgres service, and the instance runs in your own GCP project.
Yes. Cloud SQL's regional configuration keeps a standby instance in a second zone with synchronous replication and fails over automatically, with a 99.95% SLA on Enterprise edition and 99.99% including maintenance on Enterprise Plus. Supabase offers read replicas and point-in-time recovery as project add-ons.
Yes. Over the public internet with SSL using the project's connection string, ideally through Supabase's pooler, since Cloud Run instances scale out and each one opens its own connections. Cloud SQL can instead be reached over private IP from Cloud Run, with IAM database authentication in place of a password.
With Encore you declare a database in application code with its migrations, and deploying to GCP provisions a Cloud SQL instance in your own project and connects your services to it. Locally, encore run starts Postgres for the same code.
Deploy to your cloud on AWS and Google Cloud
without managing infrastructure
Encore lets developers and agents define application infrastructure directly in code, then automatically provisions it from local development to production in your AWS or GCP account.