To reproduce the problem
surroundings:
postgresql: 11.5
windows 10 企业版LTSC 64位
Use postgresql-11.5-1-windows-x64.exe
after installation, so restart, but after the restart, still did not find pstgresql service in the service, there is no way to start the service. And view the installation directory pgsql, data is empty.
solve
registered.
Therefore needs its own registration services, cd to the bin directory of the installation directory pgsql I are:C:\Program Files\PostgreSQL\11\bin
After running the following command:
pg_ctl.exe register -N PostgreSQL -D C:\Program Files\PostgreSQL\11\data\
Each version of the format command may differ, you can use pg_ctl.exe --help to see the syntax. Note that the data directory specified -D. After register load.
start up
.\pg_ctl.exe -D ..\data\ -l e:\logfile.LOG start
Such logs in e: \ logfile.LOG generated, and also launched a service.