- Could be an OSX issue (wrong location of built-in unix-domain socket // version kludge). Does
psql pdbt -l
work ? - also try with -h dirname eg
pg_dump -h /tmp/ pdbt > pdbt.sql
- Does
psql -h localhost pdbt -l
work ? - then:
pg_dump -h localhost pdbt
will probably work, too. - To find out of multiple version for pg_dump co-exist, you could try:
find / -name pg_dump -ls
, after that you can try the various versions using the complete pathname (eg/usr/bin/pg_dump -h localhost
or/usr/local/bin/pg_dump -h localhost
or whatever find found) - Presumably the older(wrong) version is first in the path.
In most cases some OSX installion process left some old binaries installed (one release of OSX had different buit-in paths for the unix domain socket). Also: try to check for differnt versions of the binaries (with the wrong one first in the PATH)
Related: (psql instead of pg_dump, but probably the same OSX issue)…