Migrate PostgreSQL to Supabase: move the database and application
Timo Wevelsiep•Updated: 25.08.2026Editorial note: Versions, commands and prices may change. Please verify critical steps independently before production use. This guide does not replace individual consulting.
Moving a production database should not depend on an untested import. WZ-IT delivers a Supabase migration from €3,490 with technical assessment, rehearsal and planned cutover.
An existing PostgreSQL-to-Supabase migration is a homogeneous database move at its core. Both sides run PostgreSQL. It is still more than replacing a DATABASE_URL: roles, extensions, ownership, pooling, RLS and the target platform's operating boundaries can change application behaviour.
The other central decision is whether only the database moves or whether the application will adopt Supabase Auth, Storage, Realtime, Edge Functions and generated APIs.
What a PostgreSQL migration can transfer
pg_dump and pg_restore can normally move:
- schemas, tables and data
- indexes, constraints and sequences
- views and materialised views
- database functions and triggers
- supported extensions
- RLS policies as database objects
Ownership, superuser privileges, provider-internal roles, replication objects and platform-specific extensions should not be imported blindly. The official Supabase PostgreSQL migration guide therefore recommends exports without ownership and privileges, followed by explicit target role configuration.
Assess the source first
Before migration, capture at least:
| Area | Required review |
|---|---|
| Version | Source and target versions, upgrade or downgrade risks |
| Extensions | Availability and version on Supabase |
| Roles | Login roles, ownership, grants and superuser dependencies |
| Data | Size, large tables, large objects and write rate |
| Schema | Functions, triggers, partitioning, views and sequences |
| Application | Drivers, connection pool, transactions and SQL assumptions |
| Operations | Maintenance window, RPO, RTO, rehearsal and rollback path |
Functions that rely on filesystem access, custom background workers or superuser rights deserve particular attention. They need replacement or need to move outside the database before cutover.
PostgreSQL sources covered by this path
The same technical base path applies to managed PostgreSQL services. Provider-specific concerns belong in the assessment or a dedicated guide:
- self-managed PostgreSQL and on-premises databases
- Render Postgres, Railway Postgres and Fly Postgres
- Google Cloud SQL and Azure Database for PostgreSQL
- DigitalOcean Managed PostgreSQL, Aiven and similar services
- AWS RDS and Aurora PostgreSQL
- Heroku Postgres
- Neon and former Vercel Postgres
A separate provider page is worthwhile only when networking, roles, branching, add-ons or cutover produce genuinely distinct content. Replacing a brand name alone would not help readers or search engines.
Dump and restore or logical replication?
Maintenance window with dump and restore
For manageable databases, a controlled export and import is often the clearest path:
- Prepare the target project and extensions.
- Create a test dump and restore it into Supabase.
- Resolve errors, roles and incompatible objects.
- Record transfer duration and validation queries.
- Stop writes for cutover, export the final state and switch.
This method is easy to verify but needs a write pause appropriate to the data volume.
Logical replication for a short cutover
Supabase also documents logical replication for PostgreSQL 10 and later. It is useful when the source must keep accepting writes while the initial data is copied. Prerequisites include replication privileges, wal_level=logical, replication slots and a replica identity for changing tables.
DDL changes, sequences and large objects are not replicated automatically. A schema freeze, sequence reconciliation and final write stop therefore remain part of the plan.
Roles, RLS and APIs after import
An existing PostgreSQL application often uses custom login roles or one central database user. Supabase adds anon, authenticated and service_role, plus PostgREST and Auth.
After import, decide:
- Will the application retain a direct PostgreSQL connection?
- Will tables be exposed through the Supabase Data API?
- Which tables require RLS?
- Which access paths will use user JWTs?
- Which server processes may use
service_role?
RLS must work in real user journeys, not merely exist as SQL. Test allowed and denied access explicitly. See the dedicated guide to auditing Supabase RLS.
Change connections and pooling
Supabase provides direct connections plus Supavisor session and transaction pooling. The modes are not interchangeable for every framework:
- migration tools and long-running sessions need session mode or a direct connection
- serverless applications often benefit from transaction pooling
- prepared statements and session-dependent behaviour need testing
- firewall access, IPv4/IPv6 reachability and TLS belong in acceptance
Point a staging deployment at Supabase first. Production secrets and DATABASE_URL change only after it passes.
Database-only move or complete Supabase backend?
A PostgreSQL migration can intentionally remain database-only. Adopting more Supabase services creates separate workstreams:
- move existing identity management to Supabase Auth
- transfer files into Supabase Storage
- implement access rules as RLS
- connect REST, GraphQL or Realtime clients
- move jobs or backend code to Edge Functions or external workers
These changes should not be hidden inside a database import. They alter the application and need their own acceptance criteria.
Acceptance and rollback
Acceptance should compare more than total row count. Verify:
- row counts and samples of critical records
- constraints, indexes, sequences and defaults
- functions, triggers and scheduled work
- performance of critical queries
- write and transaction behaviour
- roles, grants and negative RLS tests
- application, API and background processes
Use the Supabase migration checklist for the final sequence. After cutover, WZ-IT can operate the target as managed Supabase.
Sources
Rather have it operated?
You'd rather not run Supabase yourself? WZ-IT handles setup, operations and maintenance - privacy-focused from Germany.
Enquiry
Migrate, secure, or operate Supabase
We migrate Supabase projects and existing backends such as Firebase, Lovable, PostgreSQL, MySQL or Auth0, build the target environment, and can take over ongoing operations.
Frequently Asked Questions
Answers to the most important questions
Many PostgreSQL workloads can be moved. Version, extensions, roles, superuser dependencies and functions restricted in a managed target still need assessment first.
Not completely. Supabase documentation notes that roles and privileges need to be reorganised for the target. RLS must also be explicitly reviewed and enabled after import.
Logical replication can shorten the final write pause for compatible sources. DDL, sequences and some object types still require separate cutover handling.
No. Moving the database does not automatically implement Auth, Storage, Realtime or Functions. Those services are introduced only when the application needs them.
A Supabase migration starts at €3,490 excluding VAT. The final scope and price depend on the source, data volume, compatibility, cutover and required Supabase components.
More on Supabase
- What is Supabase?
- Supabase Cloud vs self-hosted
- Supabase self-hosting: pros & cons
- Supabase cost: Cloud vs self-hosted
- Migrate Supabase Cloud to self-hosted
- Migrate a Supabase project, region or organisation
- Migrate PostgreSQL to Supabase
- Migrate AWS RDS and Aurora to Supabase
- Migrate Heroku Postgres to Supabase
- Migrate Neon and Vercel Postgres to Supabase
- Migrate MySQL and MariaDB to Supabase
- Migrate Microsoft SQL Server and Azure SQL to Supabase
- Migrate Firebase to Supabase
- Migrate Lovable Cloud to Supabase
- Migrate Auth0 to Supabase Auth
- Supabase migration checklist
- Back up Supabase completely
- Update self-hosted Supabase
- Audit Supabase RLS
- Run Supabase on Hetzner
- Install Supabase with Coolify





