Can't find pg_dump and pg_restore commands
aoc opened this issue · 1 comments
aoc commented
Operating System and Version
macOS Catalina 10.15.3
pgsh --version
0.11.3
The command you are running
❯ pgsh clone mydb mydb_copy
Your
.pgshrc
file (if any) and the relevant part of your.env
, obfuscated as necessary
{
"mode": "url",
"vars": {
"url": "DATABASE_URL"
}
}
Your expected output
The command runs fine
The actual output on your system with
DEBUG=pgsh:*
in your environment (no passwords or hostnames are logged)
Going to clone api_development to api_development_copy...
/bin/sh: pg_dump: command not found
/bin/sh: pg_restore: command not found
Clone failed: clone failed; this can happen if you do not have the proper permissions on your user (postgres). Try configuring vars.super_[user|password] in your .pgshrc to provide login information for commands that need it.
Any additional information you think may help
The psql
command runs fine because I see the database gets created. I found that pg_dump
and pg_restore
child processes don't get all the env vars from parent (including PATH)
I'm sending a PR to fix this
aoc commented
some more context: MacOS using homebrew. I didn't install postgres but only libp
to get the tools