winsw / winsw

A wrapper executable that can run any executable as a Windows service, in a permissive license.
MIT License
12.28k stars 1.6k forks source link

Deploying PostgreSQL database failed to start #1091

Open liusuyi2021 opened 4 months ago

liusuyi2021 commented 4 months ago
postgres postgres PostgreSQL Database Manual postgres postgres true D:\server_setup\postgres\logs reset %POSTGRESQL_HOME%\bin\postgres.exe -D %POSTGRESQL_DATA% -l %POSTGRESQL_LOGS%\postgresql.log start true %POSTGRESQL_HOME%\bin\pg_ctl.exe -D %POSTGRESQL_DATA% -l %POSTGRESQL_LOGS% stop [image](https://github.com/user-attachments/assets/9c838f7e-5255-4179-ac61-db8e2e4db8b4)
sherlock1982 commented 3 weeks ago

You don't really need to use WinSW for Postgresql. It is already Windows Service on it's own.

 pg_ctl register -N "Database Server" -D "[Your DB folder]"