Skip to content

supabase db diff errors with failed to connect to postgres #4175

@r-bt

Description

@r-bt

Describe the bug

I just updated to the latest supabase CLI and now when I run

supabase db diff

I get this error:

failed to connect to postgres: failed to connect to `host=127.0.0.1 user=postgres database=contrib_regression`: tls error (server refused TLS connection)

after the seeding stage

To Reproduce
Steps to reproduce the behavior:

  1. Install supabase with brew install supabase/tap/supabase
  2. Run supabase start
  3. Run supabase stop
  4. Run supabase db diff

Expected behavior

It successfully creates the migration

System information

  • Ticket ID: 9afcab51f21342c1948bac540e50642d
  • Version of OS: macOS 15.5 (24F74)
  • Version of CLI: 2.40.7
  • Version of Docker: 28.3.2, build 578ccf6
  • Versions of services:
    SERVICE IMAGE | LOCAL | LINKED
    ------------------------|------------------------|--------
    supabase/postgres | 15.8.1.085 | -
    supabase/gotrue | v2.179.0 | -
    postgrest/postgrest | v13.0.6 | -
    supabase/realtime | v2.47.0 | -
    supabase/storage-api | v1.26.5 | -
    supabase/edge-runtime | v1.68.3 | -
    supabase/studio | 2025.09.08-sha-67c1421 | -
    supabase/postgres-meta | v0.91.6 | -
    supabase/logflare | 1.18.4 | -
    supabase/supavisor | 2.6.2 | -

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions