Skip to content

ci: SupaForge on real-world sample databases - #161

Merged
jasdeepkhalsa merged 4 commits into
mainfrom
ci/real-world-datasets
Nov 3, 2026
Merged

jasdeepkhalsa merged 4 commits into
mainfrom
ci/real-world-datasets

Conversation

@jasdeepkhalsa

Copy link
Copy Markdown
Member

A nightly job (also on demand, and on PRs that touch it or the lockfile) running SupaForge on public sample databases, pinned to exact upstream revisions:

Dataset What it brings Pairs
Chinook the plain baseline pg17>pg17, pg17>pg15, pg17>Supabase 15
AdventureWorks 5 schemas, mixed-case domains, 87 views, matviews, ~100 MB of rows pg17>pg17, >pg18, >pg15, >Supabase 15
Pagila PostgreSQL 18: uuidv7(), pgvector + HNSW, virtual generated column, 55 partitions pv18>pv18
GitLab structure.sql 1,475 tables, ~5,000 indexes, 339 functions, 393 triggers, partitions in their own schemas pg17>pg17

Each run checks four things:

  • clone: clone with data.
  • sync: schema into an empty database.
  • drift: the source changes the way a migration would (renames, retypes under views, new partitions, domains, enums, functions, triggers, RLS), then diff --apply --prove.
  • restore: snapshot, then restore into a fresh database.

Every step must leave a re-scan with nothing to fix. Between same-major servers the catalog state (@akal/pg-conformance state.sql) and the clone's rows must also equal the source's.

Why: the synthetic corpus missed every bug this turned up. They are all in DBDiff/DBDiff#285, and are listed in test/real-world/known-gaps.json against it. The job fails on any unlisted failure and on a listed one that passes, so the DBDiff bump that ships #285 must clear them. Also listed: clone runs pg_dump --no-acl, so a clone doesn't carry privileges (Pagila's GRANT ALL ON SCHEMA public TO PUBLIC). That's a design question, not a regression.

Also in this PR: the PostgreSQL apt-key fetch now retries in every workflow. The version matrix failed one night on a dropped connection there (curl: (56)).

The gap list is seeded from local runs. This PR's own run confirms it for the CI-only pairs (AdventureWorks needs Ruby, and the Supabase image).

🤖 Generated with Claude Code

jasdeepkhalsa and others added 4 commits November 3, 2026 02:03
The version matrix failed one night (2026-10-28) on a dropped connection
fetching it — curl exit 56 — not on anything SupaForge did. Every workflow
that installs the PostgreSQL 18 client now retries the fetch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Chinook, AdventureWorks, Pagila (PostgreSQL 18 with pgvector) and GitLab's
schema, pinned to exact upstream revisions, between two servers started in
containers: across PostgreSQL 15, 17 and 18 and onto Supabase's image. Each
run clones the source, syncs its schema into an empty database, applies a
migration's worth of drift with --prove, and restores a snapshot; every step
must leave a re-scan with nothing to fix, and between servers of the same
major the catalog state and a clone's rows must equal the source's.

The synthetic corpus missed every bug this found: domains written unquoted,
arrays and pgvector columns losing their modifiers, partitioned tables
gaining a column, partitions outside their parent's schema, a partitioned
table's own sequence created twice, and virtual generated columns stored.
Those are listed in known-gaps.json against DBDiff#285, along with clone not
carrying privileges; the job fails on any other failure and on a listed one
that passes. Nightly, on demand, and on pull requests touching the script,
its gaps or the lockfile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t Supabase's platform objects as a gap

The first run showed two things the local runs could not. GitLab's schema
takes about 10,500 locks in one transaction and a default server holds about
7,000 (SupaForge warned, then the apply failed as it said it would), so its
servers get max_locks_per_transaction=256. And a Supabase target synced from
plain PostgreSQL reports Supabase's own extensions and realtime publication
as extra, with no fix, so the re-scan is never clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jasdeepkhalsa
jasdeepkhalsa merged commit 457a132 into main Nov 3, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant