To start PostgreSQL on Windows, you can follow these steps:
- Open the PostgreSQL installation directory. By default, it is installed in “C:\Program Files\PostgreSQL{version}”.
- Navigate to the “bin” subdirectory.
- Double-click on the “pg_ctl.exe” file to open the PostgreSQL control panel.
- Select the PostgreSQL service you want to start from the drop-down menu.
- Click on the “Start” button to start the service.
Alternatively, you can start PostgreSQL from the command line:
-
Open the command prompt.
-
Navigate to the “bin” subdirectory of the PostgreSQL installation directory.
-
Type the following command to start the PostgreSQL service:
pg_ctl.exe start -D "C:\Program Files\PostgreSQL\{version}\data"
Replace “{version}” with the version number of PostgreSQL you have installed.
Hit Enter.
After starting PostgreSQL, you can connect to it using a PostgreSQL client such as psql, pgAdmin, or any other client of your choice.