The command heroku pg:push
essentially executes two commands under the hood. First, it executes pg_dump, which makes a backup file of a specific database. Then, it pipes that file into pg_restore, where it takes that dump file and uses it to restore another database. The way we usually use it is to push a local database to a deployed heroku database.
The problem is that on windows, the command breaks while trying to pipe in the backup file from pg_dump to pg_restore, so we need to do these two commands manually.