11

What needs to go in the field PostgreSQL Binary Path under File > Preferences > Path > Binary paths?

Thomas Landauer
  • 7,857
  • 10
  • 47
  • 99

7 Answers7

20

With the latest version of PostgreSQL 9.6 running on pgAdmin 4, you will find hints under "Help" tab to this two urls after replacing $VERSION$ with the appropriate version number: https://www.enterprisedb.com/docs/en/9.6/pg/ and https://www.postgresql.org/docs/9.6/static/ (however, the links don't really give much help as such).

enter image description here

If you follow the hint below the box and search for "pg_dump, pg_restore" within the directory where you install PostgreSQL, they will be in the "bin" directory/folder

enter image description here

On windows, with default installations it is something like: C:\Program Files\PostgreSQL\9.6\bin

Copy your path and paste in the boxes under Click on "Binary paths" tab and click on "OK"

enter image description here

Umar Yusuf
  • 926
  • 2
  • 13
  • 30
9

This needs to be a directory, not a single file. So on Windows, it's usually C:\Program Files\PostgreSQL\9.6\bin

In future versions of pgAdmin 4 there will be this hint:

Path to the directory containing the PostgreSQL utility programs (pg_dump, pg_restore etc).

Thomas Landauer
  • 7,857
  • 10
  • 47
  • 99
6

So what you need to do is to configure a path (obviously) :

  1. In pgAdmin select File -> Preferences and look for Path and then click on Binary Path and it needs your path where it says PostgreSQL Binary Path

  2. Go to your computer -> C: (on windows) -> Program Files -> PostgreSQL -> your version -> bin. It should be something like this : C:\Program Files\PostgreSQL\9.6\bin. And this is what you need to copy and paste to pgAdmin.

  3. Hope it help ☺️

1

2023 Update

Just add the path of the bin folder of PostgreSQL. For example: C:\Program Files\PostgreSQL\15\bin

For postgre

enter image description here

Omer
  • 8,194
  • 13
  • 74
  • 92
0

All the binaries that are related to postgresql should be there. Which is this should be pointed to the 'bin' folder under postgre installation.

Akalanka
  • 1,411
  • 12
  • 14
0

If you are using CentOS7 put /usr/bin in binary path, but if does not work:

and... if you are upgrading pgadmin3, uninstall it first and take care of ignore libpq5...

sudo yum remove pgadmin3

sudo yum -y install pgadmin4 -x libpq5*

sudo yum -y install https://download.postgresql.org/pub/repos/yum/12/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm

...so maybe it install fine but you need do a backup, maybe you need do some extras steps to configure the Binary Path, so you need do this below:

sudo yum install rh-postgresql13-postgresql-syspaths-13.3-1.el7.x86_64

if you face a confict error with postgresql96-9.6.23-1PGDG.rhel7.x86_64 or similar, use it:

$ rpm -Va --nofiles --nodigest

$ sudo yum remove postgresql

$ sudo yum install rh-postgresql13-postgresql-syspaths-13.3-1.el7.x86_64

so after it you be able to use `pg_dump

you can check it in terminal

$ which psql

$ which pg_dump

so now you can configure the Binary Path with /usr/bin and it will work finally...

no ai please
  • 732
  • 3
  • 11
  • 24
Berzeker
  • 107
  • 5
0

The default directory for Postgres 14 on windows is: C:\Program Files\PostgreSQL\14\bin Image of pgAdmin File -> Preferences -> Binary Path I couldn't just cut and paste in the path. I needed to navigate to the directory.

Rivet174
  • 111
  • 1
  • 4