[email protected]

How-to · Supabase

Migrate Heroku Postgres to Supabase: separate database and app

Editorial note: This guide was written to the best of our knowledge at the time of publication. Versions, commands, features, prices and licensing terms may change through vendor updates; the current information from the respective provider applies. Please verify critical steps independently before production use. All trademarks, product names and company names mentioned belong to their respective owners. As a rule, WZ-IT is not a partner of the vendors and projects mentioned and is not officially affiliated with them; existing partnerships are stated explicitly. This text does not replace individual professional, legal or tax advice. If any information is outdated or incorrect, please write to [email protected].

Move Heroku Postgres through a tested process rather than an improvised export. WZ-IT provides a Supabase migration from €3,490 after reviewing the database, application and Heroku dependencies.

A Heroku Postgres to Supabase migration can be a clearly bounded database move or part of a complete Heroku exit. These are different projects: Supabase provides PostgreSQL and optional backend services, but it does not replace Heroku dynos or every add-on automatically.

Define the actual Heroku scope first

Heroku applications often combine:

  • web and worker dynos
  • Heroku Postgres and possibly followers
  • Redis or queue add-ons
  • Heroku Scheduler
  • one database attached to multiple apps
  • config vars and application secrets
  • logging, monitoring and email add-ons
  • domains, TLS and pipelines

The first decision is whether only the database moves or the entire application leaves. An app can remain on Heroku and use Supabase as an external PostgreSQL service. A complete PaaS exit also needs a new deployment and operating model.

Assess Heroku Postgres

Capture before the test export:

Area Review
Plan and size Data volume, connections, write load and maintenance window
PostgreSQL Version, extensions, schemas, functions and triggers
Roles Ownership, grants and Heroku-specific roles
Availability Followers, HA requirements and rollback path
Application Framework, ORM, pooling and direct database access
Add-ons Redis, Scheduler, logging, ETL and external integrations

Larger databases require enough target compute, storage and IOPS before import. Supabase recommends provisioning suitable target capacity for larger Heroku data sets.

Since the October 2026 Heroku update, PostgreSQL 18 is the default across all Heroku Postgres tiers. Compare source and target major versions before the test export: according to the PostgreSQL documentation, pg_dump output is not guaranteed to load into an older major version.

Rehearse export and import

The official Supabase guide uses pg_dump and psql. Excluding ownership and privileges matters because Heroku and Supabase use different managed roles.

A rehearsal answers:

  • Can every extension be enabled on the target?
  • Which roles or owners need remapping?
  • Do views, triggers and database functions work?
  • Do table, row and sequence states match?
  • How long do export, transfer, restore and validation take?
  • Which application tests fail after the switch?

The maintenance window is based on this evidence.

Connection string and application

Heroku commonly exposes database access through DATABASE_URL. Host, credentials, TLS and possibly pooling mode change after migration.

Test:

  • session or transaction pooling
  • prepared statements and ORM behaviour
  • maximum connections across dynos and workers
  • network distance between the Heroku and Supabase regions
  • SSL mode and certificate verification
  • jobs using separate database roles

Apply the new URL to a staging app or Heroku pipeline first. Replacing the production variable without a rehearsal is not a controlled cutover.

Dynos, workers and add-ons

Supabase provides a database, Auth, Storage, Realtime, APIs and Edge Functions. That does not create automatic one-to-one mappings:

Heroku component Possible treatment
Web dyno Keep on Heroku or deploy separately
Worker dyno External worker, container platform or a targeted Function
Heroku Scheduler Cron, workflow system or scheduled database job
Redis Retain or migrate to a compatible service
Heroku Postgres Transfer to Supabase PostgreSQL
Auth add-on Assess independently and optionally migrate to Supabase Auth

These components stay unchanged in a database-only move. A complete Heroku exit plans each as a separate workstream.

Cut over with a rollback checkpoint

A dump-and-restore cutover normally follows this sequence:

  1. Enable maintenance mode or a write freeze.
  2. Stop workers and scheduled jobs.
  3. Create the final export.
  4. Import data into Supabase.
  5. Verify sequences, counts and critical records.
  6. Change DATABASE_URL and related secrets.
  7. Deploy the app and workers and run smoke tests.

Keep Heroku Postgres unchanged during the rollback window. Do not resume writes until the treatment of any rollback is clear.

Introduce Supabase capabilities deliberately

The database move can later expand to Supabase Auth, Storage, Realtime or the Data API. Those changes are not hidden inside a simple PostgreSQL import. Each service needs its own data model, permissions, SDK and user-flow tests.

The general PostgreSQL-to-Supabase guide covers dump, replication, RLS and pooling in more detail. Use the Supabase migration checklist for the complete process.

WZ-IT can operate the target as managed Supabase after migration.

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.

  • You speak directly with Timo and Robin, who are technically responsible
  • A professional assessment of your situation
  • Concrete next steps for infrastructure, software or AI

The conversation is free and non-binding.

I got to know Timo and Robin as dedicated and professional partners who make a lot of things possible for their clients that initially seem impossible. I felt very well advised. The services offered have thoroughly convinced me. (translated)
Andrea PawlowskiCommunications Manager, Golem.de, Germany
Timo and Robin, founders of WZ-IT

Migrate, secure, or operate Supabase

I got to know Timo and Robin as dedicated and professional partners who make a lot of things possible for their clients that initially seem impossible. I felt very well advised. The services offered have thoroughly convinced me. (translated)
Andrea PawlowskiCommunications Manager, Golem.de, Germany

Frequently Asked Questions

Answers to the most important questions

Customers from mid-sized business, industry and the public sector, in Germany and internationally

  • Stadtwerke Brühl
  • DGHO e.V.
  • solarwerkstatt berlin
  • Krüger Dirndl
  • ABCO Water Systems
  • Golem.de
  • EVADXB
  • nextGYM
  • AInergy
  • ml&s
  • Odiseo Solutions
  • Annota
  • ARGE
  • SweetConnect GmbH
  • Aphy AG
  • CORGOS
  • Rekorder
  • SolidProof
  • Yonju
  • Keymate
  • Paritel
  • Mr. Clipart
  • Millenium
  • Negosh
  • Führerscheinmacher
  • BTI
  • Deutsche Gesellschaft für Datenschutz
Read client reviews