Set the PATH = C: \ Program Files \ PostgreSQL \ 9.4 \ bin

Suppose DB named postgres backup dump is C:\Program Files\postgres.dump

psql -h localhost -p 5432 -U postgres -f C:\Program Files\postgres.dump
Copy the code

Restart the service

Or you can do the same with the following command.

net stop postgresql-x64-12
net start postgresql-x64-12
Copy the code