[INF-1722] Add configurable migration controller - #14
Open
thesyncim wants to merge 46 commits into
Open
Conversation
This reverts commit 56e20d5.
thesyncim
force-pushed
the
codex/inf-1722-controller-gui
branch
from
August 24, 2026 10:15
8a4fee9 to
869cb93
Compare
thesyncim
force-pushed
the
codex/inf-1722-controller-gui
branch
from
August 24, 2026 10:33
869cb93 to
541d282
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket
Summary
Add a private, restart-safe controller dashboard and replace the high-volume complete-UPDATE replay path with exact primary-key upserts modeled on the proven
crdb-to-pgapproach.Implementation
pgmigrate controlleron loopback by default; non-loopback listeners still require a token.INSERT ... ON CONFLICT (<actual target primary key>) DO UPDATE.pg_index, and force safe batched DELETEs through one exact PK-to-CTID lookup per identity so the planner cannot choose an unrelated secondary index.unnest, typed temporary COPY stages for large custom-type groups, and bounded VALUES fallback.synchronous_commit=on.Safety review
Validation
GOCACHE=/private/tmp/pgmigrate-final-gocache go test ./... -count=1GOCACHE=/private/tmp/pgmigrate-final-gocache go vet ./...GOCACHE=/private/tmp/pgmigrate-final-gocache go test -race ./internal/cdc ./internal/controller -count=1PGTEST_MAJORS=17 go test -tags=integration ./internal/cdc -count=1Live c3 validation
pgmigrate:v57@sha256:4b8acc92b34cb48e76d7d252996413160654c29f005c676dd14f637e995c460f(amd64 + arm64), pinned by GetStream/chat#16022. The embedded Go build revision is40728517acd4c1003c2fe12584fa20da0d70258ewithvcs.modified=false.pg_stat_statementsproves the live path usesON CONFLICTon exact PKs such aschannels(app_pk,cid)andchannel_members(app_pk,channel_cid,user_id).messagesDELETE outlier was traced to composite probes ordered(id,app_pk)whilemessages_pkeyis(app_pk,id). A productionEXPLAINproved that ordering alone still selectedmessages_by_user; the final CTID shape plans asIndex Scan using messages_pkeyplusTid Scan.1BF9D/81DDB620/ 81,522,814 rows / 8,700,697 transactions and advanced past the formerly stuck transaction to 81,634,615 rows / 8,711,932 transactions.Checklist