pg:pull with --exclude-table-data does not work on Windows
Maintainers usually reply within 1 day
A pull request for this has already been merged.
- #1987 by @rodxavier — merged
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- postgresql, typescript
Research direction
Start at the heroku pg:pull entry point and trace generation of the pg_dump child-process arguments, comparing Windows with the working Mac behavior. Reproduce the command with --exclude-table-data on Windows and verify that the database name remains in the expected position and the pull succeeds without data from the specified tables.
Written by the indexing model from the issue text.
Description
Do you want to request a feature or report a bug?
This is a bug report for Windows. This same command works as expected on Mac.
Heroku Version: heroku/7.60.1 win32-x64 node-v14.19.0
OS: Windows 10 OS Build(19044.1645)
This bug happens due to the generation of the pg_dump child process args. The resulting child process call for windows looks something like:
C:\WINDOWS\system32\cmd.exe /d /s /c "pg_dump --verbose -F c -Z 0 -N _heroku -U <user> -h localhost -p <port> <dbname> --exclude-table-data=table1 --exclude-table-data=table2'
It looks like pg_dump on Windows expects the dbname to be the last part of the command.
What is the current behavior?
Running heroku pg:pull --exclude-table-data "table1;table2" results in an error with pg_dump.
pg_dump: error too many command-line arguments first is "--exclude-table-data=table1"
What is the expected behavior?
Expected behaviour is to pull the database without data from the specified tables
- Dominant language
- TypeScript
- Stars
- 888
- Forks
- 236
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 36
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from heroku/cli
-
The APT installer for the CLI should create a file in deb822 format on Ubuntu 26.04Possibly taken @ChipV223 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
heroku/cli#3974 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
heroku/cli#3867 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
config:get does not distinguish between unset and empty env varsPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 3/5 1-2 days Newbie friendliness 62/100
heroku/cli#3450 · 4 comments ·
Maintainers usually reply within 1 day
-
on-call reviewed
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
Maintainers usually reply within 1 day
-
on-call reviewed
Difficulty 4/5 3-5 days Newbie friendliness 35/100
heroku/cli#3222 · 2 comments ·
Maintainers usually reply within 1 day
Similar issues
-
check:passed streams:add
Difficulty 1/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
beta technical-medium ui
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
walletbeat/walletbeat#1625 ·
Maintainers usually reply within 1 day
-
Good First Issue hacktoberfest
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
hiero-ledger/hiero-sdk-js#4489 ·
Maintainers usually reply within 1 day
-
[Bug] The clients language filter cannot select the rows the page labels as unknownPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
apache/rocketmq-dashboard#6103 ·
Maintainers usually reply within 4 days
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
payloadcms/payload#18652 ·
Maintainers usually reply within 1 day