Skip to content

fix(cli): skip pg_dump in db pull when using pg-delta diff engine#5255

Draft
avallete wants to merge 6 commits into
developfrom
claude/pg-deltas-db-pull-ayJdw
Draft

fix(cli): skip pg_dump in db pull when using pg-delta diff engine#5255
avallete wants to merge 6 commits into
developfrom
claude/pg-deltas-db-pull-ayJdw

Conversation

@avallete
Copy link
Copy Markdown
Member

Initial pulls under --diff-engine pg-delta were dumping the remote
schema via pg_dump before running pg-delta. The dump-then-restore
round-trip strips ownership information for objects the local postgres
role cannot assume, so platform-managed objects (FDWs, wasm wrappers,
system-owned ACLs) leak into the migration file and break
`supabase db reset` (see CLI-1469, CLI-1470).

pg-delta speaks pg_catalog directly via extractCatalog and the supabase
integration filters platform objects by owner. Diffing against an
empty shadow on initial pull yields a clean initial migration on its
own, so dumpRemoteSchema is unnecessary on this path.

Initial pulls under --diff-engine pg-delta were dumping the remote
schema via pg_dump before running pg-delta. The dump-then-restore
round-trip strips ownership information for objects the local postgres
role cannot assume, so platform-managed objects (FDWs, wasm wrappers,
system-owned ACLs) leak into the migration file and break
\`supabase db reset\` (see CLI-1469, CLI-1470).

pg-delta speaks pg_catalog directly via extractCatalog and the supabase
integration filters platform objects by owner. Diffing against an
empty shadow on initial pull yields a clean initial migration on its
own, so dumpRemoteSchema is unnecessary on this path.
@avallete avallete requested a review from a team as a code owner May 18, 2026 06:33
@coveralls
Copy link
Copy Markdown

coveralls commented May 18, 2026

Coverage Report for CI Build 26248142775

Warning

No base build found for commit b2f10f0 on develop.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 63.936%

Details

  • Patch coverage: No coverable lines changed in this PR.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 16013
Covered Lines: 10238
Line Coverage: 63.94%
Coverage Strength: 6.99 hits per line

💛 - Coveralls

jgoux and others added 5 commits May 18, 2026 10:53
Added documentation for testing local pg-delta builds in CONTRIBUTING.md, detailing the steps to publish local changes and configure the CLI to use a local npm registry.

Updated the RunEdgeRuntimeScript function to accept additional options for handling npm registry configurations, allowing for scoped .npmrc files and environment variable forwarding.

Introduced PgDeltaNpmRegistryOption to manage npm registry settings and added tests to ensure correct behavior.

Refactored related functions to integrate these enhancements, improving the overall local development experience for pg-delta.
@avallete avallete marked this pull request as draft May 21, 2026 19:25
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.

4 participants