Postgresql – Cannot do a restore using PgAdmin4 after a new install of PostgreSQL – pg_restore.exe file not found

pgadmin-4postgresql

I am new to PostgreSQL. I installed the software. Almost everything works. Then I tried to follow a tutorial for dvdrental. All instructions for using from command line worked. Then there is instruction for creating a DB using pgAmdin 4, which also worked. The next instruction is to do a restore. This fails. The error message is 'C:\Program Files\PostgreSQL\13\pgAdmin 4\runtime\pg_restore.exe' file not found. Please correct the Binary Path in the Preferences dialog.
The message is correct. pg_restore.exe is not in the runtime folder, the runtime folder does not exist. There is a bin folder and pg_restore.exe is that direction.
I tried various things such as changing "EDB Advanced Server Binary Path", I also created folder runtime and copied everything that was in bin folder to runtime, but it still will not work. This looks like an installation problem. Same message seemed to have appeared for years, but none of those solutions have worked for me. I would appreciate any help.

Best Answer

I was able to fix (or patch) the problem by coping files.

  1. Searched for pg_restore.exe from folder 'C:\Program Files\PostgreSQL\13'. I found the file in 'C:\Program Files\PostgreSQL\13\bin'.
  2. Then I copied all the files from 'C:\Program Files\PostgreSQL\13\bin' folder to 'C:\Program Files\PostgreSQL\13\pgAdmin 4\runtime' where the error message says file is missing. Note: After install, there was no runtime folder. I had to create it. The error went away and restore seems to work. I am not sure this is the right solution, but for now, it works.