Reputation: 181
When trying to install postgreSQL using the graphical windows installer x64 it fails to install this as a Windows Service
>Windows Specific Configuraton
>[14:07:54] Windows Actions (services)
>Starting service "PostgreSQL 9.6 Server"
>Executing sc start "PostgreSQL 9.6 Server"
>Script exit code: 1060
>
>Script output:
> [SC] StartService: OpenService FAILED 1060:
>
>The specified service does not exist as an installed service.
>
>
>Script stderr:
> Program ended with an error exit code
>
>Error running sc start "PostgreSQL 9.6 Server": Program ended with an error >exit code
>Problem running post-install step. Installation may not complete correctly
> Error running sc start "PostgreSQL 9.6 Server": Program ended with an error >exit code
How do I correct this, and why did it happen?
Upvotes: 1
Views: 497
Reputation: 6328
You can try to install the service manually, using
pg_ctl register [-N servicename] [-U username] [-P password] [-D datadir] [-S a[uto] | d[emand] ] [-w] [-t seconds] [-s] [-o options]
According to PostgreSQL documentation on pg_ctl
:
register
mode allows you to register a system service on Microsoft Windows. The-S
option allows selection of service start type, either "auto" (start service automatically on system startup) or "demand" (start service on demand).
If pg_ctl
cannot register the service, it will most probably give a proper error message, pointing you in the proper direction (incorrect datadir, insufficient privileges for username
to access and write to datadir
, etc.)
The "standard" servicename used by the Graphical Installer (at least with the EnterpriseDB one) is: postgresql-x64-9.6
for PostgreSQL 64-bit version 9.6.*.
Upvotes: 1