I'm installing PostgreSQL on a Windows 2008r2 Server, with the intention to use with a Delphi 7 application over ODBC.
I followed the PostgreSQL 12.2 Documentation Not needing to install from source as described in chapter 17, I opted for the Installer that was linked to Following the guidance of the Installation Guide (Installers) I completed the install process without errors.
After restarting the server, I can see the service postgresql-12-x64 is running.
I created the user postres, and was able to start the commandline using runas:
c:\>runas /user:postgres "C:\Program Files\PostgreSQL\12\bin\psql.exe"
Enter the password for postgres:
Attempting to start C:\Program Files\PostgreSQL\12\bin\psql.exe as user "****\postgres" ...
The installer apparently did not update the path, so I had to provide the full path. Now I have a command window on the server machine with a postgres-# prompt.
Next, I want to verify that I can connect to the server from another machine. Posts I find say to use a command like:
psql -h SERVER-IP -U postgres
However, psql.exe is installed on the server not the client machine. What is a "test" executable that can be run from the client to verify that it is able to communicate with the server? Is it as simple as copying psql.exe from the server's C:\Program Files\PostgreSQL\12\bin folder to a temp folder on the client? I tried that and psql.exe closes without any output or error indication:
H:\temp>ping 192.168.2.1
Pinging 192.168.2.1 with 32 bytes of data:
Reply from 192.168.2.1: bytes=32 time<1ms TTL=128
^C
H:\temp>psql -h 192.168.2.1 -U postgres
H:\temp>
0 Answers