Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

pg:pull with --exclude-table-data does not work on Windows

Open
#1,986 5 comments 0 reactions 0 assignees View on GitHub

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
Domain
cli, database

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

bug on-call reviewed

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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from heroku/cli

All issues in heroku/cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.