Repository navigation
fix: ensures dbname is always the last arg provided to pg_dump - #3979
Merged
Merged
Conversation
tlowrimore-heroku
had a problem deploying
to
AcceptanceTests
October 8, 2026 20:34 — with
GitHub Actions
Error
tlowrimore-heroku
had a problem deploying
to
AcceptanceTests
October 8, 2026 20:34 — with
GitHub Actions
Error
tlowrimore-heroku
had a problem deploying
to
AcceptanceTests
October 8, 2026 20:34 — with
GitHub Actions
Failure
tlowrimore-heroku
had a problem deploying
to
AcceptanceTests
October 8, 2026 20:34 — with
GitHub Actions
Failure
tlowrimore-heroku
marked this pull request as ready for review
October 8, 2026 21:01
This branch was successfully deployed
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.
Summary
Addresses an issue originally reported in April of 2022, where the arguments being provided to
pg_dumpwere not in the correct order (database name should be the last argument). This was not a problem on MacOS and Linux, but it resulted in an error, when run on Windows.The originally proposed solution was to simple prepend the
--exclude-table-dataflag to the flags array. Our solution takes a different approach. Rather than expanding the connection arguments into the flags array, and only pushing additional flags onto the head of the array, the connection arguments are concatenated with the flags just before spawning the child command, within whichpg_dumpis executed. This allows for flags to be either prepended or appended to the flags array. By concatenating the connection args onto the flags array, we can guarantee connection args are always at the end of the args sent topg_dump. This approach also ensures the flags array only contains flags.Type of Change
Breaking Changes (major semver update)
!after your change type to denote a change that breaks current behaviorFeature Additions (minor semver update)
Patch Updates (patch semver update)
Testing
pg:pushandpg:pullon Windows, using the--exclude-table-dataflag.Screenshots
Tested on Windows
1. Verified the records in the remote (Heroku) database
2. Ran heroku pg:pull in Windows
3. Verified the database was restored, excluding the records in
ideastableRelated Issues
GitHub issue: #1986
GUS work item: W-16153699