## Unable to run PostgreSQL as Windows service

unable to start postgresql server
start postgres server windows
postgresql service not starting linux
failed to start postgresql cluster 10-main
install postgresql windows
postgresql server 8.3 service failed to start
pg_ctl: could not start server

I had this in my Windows services:

C:/Program Files/PostgreSQL/8.4/bin/pg_ctl.exe runservice -N "postgresql-8.4" -D "D:/PostgreSQL/8.4/data" -w


It never finishes executing. But if I did this on the dos shell:

C:/Program Files/PostgreSQL/8.4/bin/pg_ctl.exe start -N "postgresql-8.4" -D "D:/PostgreSQL/8.4/data" -w


Notice that I only changed the "runservice" to "start" and it works just fine.

Any idea?

The command runservice can only be executed by the service manager

in order to fix my localhost windows 7 to start postgres as a service i used the following command to start the data

 pg_ctl -D "C:\Program Files\PostgreSQL\9.1\data" start


Then checked the status for errors

 pg_ctl -D "C:\Program Files\PostgreSQL\9.1\data" status


if you get error 1063 , its more than likely permissions, i executed the following command

 cacls "C:\Program Files\PostgreSQL\9.1\data" /E /T /C /G postgres:F


then reran the start/status, it showed everything fine, but still service manager would not start the service

So, in Services->postgresql->options->logon i set the log on as the Local system account instead of the postgres user, and voila it worked

Unable to run PostgreSQL as Windows service, The command runservice can only be executed by the service manager. in order to fix my localhost windows 7 to start postgres as a service i  The command runservice can only be executed by the service manager in order to fix my localhost windows 7 to start postgres as a service i used the following command to start the data pg_ctl -D "C:\Program Files\PostgreSQL\9.1\data" start Then checked the status for errors

this happened to me because i set my data directory to be somewhere the postgres windows user account didn't have access to.

Running postgres as a service on windows starts and stops , I then tried to re-install Postgres but it got to the end and it was not able to start. Any help would be great. share. Heroku Heroku is a platform as a service (PaaS) that enables developers to build, run, and operate applications entirely in the cloud. DevOps . Hosting Hosting tutorials on Tutlinks. Hosting or web hosting is the process of deploying our software applications be it a WebSite, an API or a Software as A Service to an infrastructure provided by

I faced the same issue after moving manually the database data files (PG_DATA directory) without recreating all the necessary permissions.

Here is how I solved my issue:

##### 1. Check permissions on old PG_DATA directory:
cacls "c:\path\to\old\pgdata\dir"

##### 2. Check permissions on new PG_DATA directory:
cacls "d:\path\to\NEW\pgdata\dir"

##### 3. Compare outputs from 1. and 2.

Find the differences between users and/or permissions then synchronize them.

Nota: I found it easier to use explorer for the synchronization step rather than using cacls directly from the command line.

PostgreSQL won't start anymore, Windows could not start the PostgreSQL Database Server 8.3 service on Local Computer. Error 1053: The service did not respond to the start or control request​  The solution was simply to comment the lines "work_mem=256MB" and "maintenance_work_mem=\$3GB" in the file postgresql.conf and try to start the postgresql service. (start -> run -> services.msc) and look for the postgresql-[version] service then right click and start.

I had this problem in Windows after a system crash. Running the first command showed invalid data in C:\Program Files\PostgreSQL\9.1\data\postmaster.pid. Deleting that file did the trick. Reference.

Re: postgres failed to start from services manager on windows 2008 r2, We are able to start the postgres from command line without any issue, if postgres is registered as windows. service and tried to start it, we are  "PostgreSQL uses the password specified on the Password window for both the database superuser and the PostgreSQL service account. PostgreSQL runs as a service in the background; the PostgreSQL service account is named postgres. *[If you have already created a service account with the name postgres, you must specify same password as the

If you changed pg_hba.conf , maybe you missed somewhere in file. For example there must be CIDR after IP in that file. It must be like 192.168.1.100/32

If you forgot to put 32, then server doesnt restart.

Investigation of startup logs could be a clue. For the case problem is in the pg_hba.conf you could see something like this:

2018-11-13 00:39:34.841 PST [8284] FATAL:  could not load pg_hba.conf
2018-11-13 00:39:34.842 PST [8284] LOG:  database system is shut down


postgres service does not start after windows restart, but when i restart my windows i am unable to start the service. the service Could not start PostgreSQL Database Server 8.0 service on local computer The start the server using pg_ctl as mentioned by Nirmal (and described in the manual). Make sure you start PostgreSQL using the same (Windows) user that you used when running initdb to avoid problems with file permissions! share. |.

Postgresql 11 failing to Install on Windows, I cannot get it to install on a Windows 2016 Server machine. The error message I get at the end of installation always is: "Failed to load SQL Modules into database​  Job for postgresql@10-main.service failed because the service did not take the steps required by its unit configuration. See "systemctl status postgresql@10-main.service " and "journalctl -xe" for details.

Set Up a PostgreSQL Database on Windows, To use Media Server with a PostgreSQL database, you must download and to start the PostgreSQL command-line tool (psql) from the Windows Command If the connection failed, use the information in the message to resolve any issues. Re: Unable to start PostgreSQL as a service Post by TrevorH » Wed Jun 06, 2012 1:56 pm Your problem is because you have moved the location of the data files from the default place and selinux does not know anything about the new location.

How to start and stop PostgreSQL server?, In this post, we are going to figure out how to start, stop, and restart a PostgreSQL server on macOS, Linux, and Windows.

• Instead of postgres user, I used the NETWORK_SERVICE user. See here for details: stackoverflow.com/a/38563535/363573