I have PostgreSQL 9.4 (not installed, rather configured myself), which is also installed as a Windows service. Now I'm trying to check the status of the server with pg_ctl.exe status -D data_dir_path, but it only shows the status when I start the console as admin.
My ultimate goal is to shut down / start the database server without administrator privileges. Is it possible to configure PostgreSQL so that I can start / stop servers locally without administrator privileges?
As far as I read in the PostgreSQL documentation , services can be registered for the user using arguments [-U username] [-P password], but I'm not sure if this is a database user or a local window user. I tried to register the service using the following code, but it does not install it. And I don’t see any magazines either. Commnd follows:
pg_ctl.exe register -N service_name -U database_user -P database_user_password -D data_dir_path -S auto -o "-p port"
Thanks in advance
source
share