Starting PostgreSQL on Windows: Using Services Manager, Command Prompt, and More
pg_ctl -D "C:\Program Files\PostgreSQL\14\data" restart
Explanation:
pg_ctl
is the program used to control the PostgreSQL server.-D
specifies the data directory location (adjust the path as needed).restart
tellspg_ctl
to restart the PostgreSQL server if it's already running, or start it if it's not.
Using net start:
net start postgresql-x64-14
net start
is a built-in Windows command to start services.postgresql-x64-14
is the name of the PostgreSQL service (version number might differ on your system).
postgresql