stop psql server windows 1

stop psql server windows

pg_ctl -D "C:\Program Files\PostgreSQL\9.6\data" stop

Here is what the above code is Doing:
1. We’re using the subprocess module to run the pg_ctl command.
2. We’re using the -D flag to specify the location of the data directory.
3. We’re using the stop flag to stop the server.

Similar Posts